Package properties provides functions for reading and writing ISO-8859-1 and UTF-8 encoded .properties files and has support for recursive property expansion. Java properties files are ISO-8859-1 encoded and use Unicode literals for characters outside the ISO character set. Unicode literals can be used in UTF-8 encoded properties files but aren't necessary. To load a single properties file use MustLoadFile(): To load multiple properties files use MustLoadFiles() which loads the files in the given order and merges the result. Missing properties files can be ignored if the 'ignoreMissing' flag is set to true. Filenames can contain environment variables which are expanded before loading. All of the different key/value delimiters ' ', ':' and '=' are supported as well as the comment characters '!' and '#' and multi-line values. Properties stores all comments preceding a key and provides GetComments() and SetComments() methods to retrieve and update them. The convenience functions GetComment() and SetComment() allow access to the last comment. The WriteComment() method writes properties files including the comments and with the keys in the original order. This can be used for sanitizing properties files. Property expansion is recursive and circular references and malformed expressions are not allowed and cause an error. Expansion of environment variables is supported. The default property expansion format is ${key} but can be changed by setting different pre- and postfix values on the Properties object. Properties provides convenience functions for getting typed values with default values if the key does not exist or the type conversion failed. As an alternative properties may be applied with the standard library's flag implementation at any time. Properties provides several MustXXX() convenience functions which will terminate the app if an error occurs. The behavior of the failure is configurable and the default is to call log.Fatal(err). To have the MustXXX() functions panic instead of logging the error set a different ErrorHandler before you use the Properties package. You can also provide your own ErrorHandler function. The only requirement is that the error handler function must exit after handling the error. Properties can also be loaded into a struct via the `Decode` method, e.g. See `Decode()` method for the full documentation. The following documents provide a description of the properties file format. http://en.wikipedia.org/wiki/.properties http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.Reader%29
Package multiconfig provides a way to load and read configurations from multiple sources. You can read from TOML file, JSON file, YAML file, Environment Variables and flags. You can set the order of reader with MultiLoader. Package is extensible, you can add your custom Loader by implementing the Load interface.
Package identicon 一个基于 hash 值生成随机图像的包 identicon 并没有统一的标准,一般用于在用户注册时, 取用户的邮箱或是访问 IP 等数据(也可以是其它任何数据), 进行 hash 运算,之后根据 hash 数据,产生一张图像, 这样即可以为用户产生一张独特的头像,又不会泄漏用户的隐藏。 在 identicon 中,把图像分成以下九个部分: 其中 1、3、9、7 为不同角度(依次增加 90 度)的同一张图片, 2、6、8、4 也是如此,这样可以保持图像是对称的,比较美观。 5 则单独使用一张图片。 NOTE: go test 会在当前目录的 testdata 文件夹下产生大量的随机图片。 要运行测试,必须保证该文件夹是存在的,且有相应的写入权限。
Package iconv is golang bindings to libiconv that converts string to requested character encoding.
Wraps the iconv API present on most systems, which allows for conversion of bytes from one encoding to another. This package additionally provides some convenient interface implementations like a Reader and Writer.
Package semanticiconsugc provides semantic UI icons that are deemed to be safe to be accepted from user generated content.
Package identicon is an open source avatar generator inspired by GitHub avatars. IdentIcon uses a deterministic algorithm that generates an image (using Golang's stdlib image encoders) based on a text (Generally Usernames, Emails or just random strings), by hashing it and iterating over the bytes of the digest to pick whether to draw a point, pick a color or choose where to go next. IdentIcon's Generator enables the creation of customized figures: (NxN size, points density, custom color palette) as well as multiple exporting formats in case the developers want to generate their own images.
Package icons provides Go constant names for Material Design Symbols as SVG files.
Package systray is a cross-platform Go library to place an icon and menu in the notification area.