Package yaml implements a koanf.Parser that parses YAML bytes as conf maps.
Package fmatter is a simple YAML Front Matter parser, using the gopkg.in/yaml.v2 package.
Package swap is an agnostic config parser (supporting YAML, TOML, JSON and environment vars) and a toolbox factory with automatic configuration based on your build environment.
Package yaml implements a koanf.Parser that parses YAML bytes as conf maps.
Package cnfg provides procedures to parse a slew of environment variables into a struct pointer. Use this package if your app uses a config file and you want to allow users to change or override the configurations in that file with environment variables. You can also use this app just to parse environment variables; handling a config file is entirely optional. Every member type is supported. If I missed one, please open an issue. If you need a non-base type supported (net.IP works already) please open an issue. New types are extremely easy to add. If this package interests you, pull requests and feature requests are welcomed! I consider this package the pinnacle example of how to configure Go applications from a file. You can put your configuration into any file format: XML, YAML, JSON, TOML, and you can override any struct member using an environment variable. I created this package because I got tired of writing custom env parser code for every app I make. This simplifies all the heavy lifting and I don't even have to think about it now. I hope you enjoy using this simplification as much as I do!
Author: Enes Uysal Author: Enes Uysal Author: Enes Uysal Author: Enes Uysal Author: Enes Uysal
Package groph is a simple graph database that can be loaded / stored from / to JSON and YAML files. Refer to package parser to instructions about how to load a file as a graph.
Package go-yaml implements a YAML AST parser for Go.
Package frostedmd converts Markdown files to structured data and HTML. The structured data is extracted from a Meta Block if present: a code block at the beginning (or, optionally, the end) of the file. At the beginning of the file, the Meta Block may optionally be preceded by a single heading. Parsing and rendering are handled by the excellent Blackfriday package: https://godoc.org/github.com/russross/blackfriday YAML processing is handled with the nearly canonical YAML package from Canonical: https://godoc.org/gopkg.in/yaml.v2 The Meta Block position can be reversed globally by setting MetaBlockAtEnd to true, or at the Parser level. In reversed order the meta code block must be the last element in the Markdown source. If the Meta contains no Title (nor "title" nor "TITLE") then the first heading is used, if and only if that heading was not preceded by any other block besides the Meta Block. Supported languages for the meta block are JSON and YAML (the default); additional languages as well as custom parsers are planned for the future. If an appropriate meta block is found it will be excluded from the rendered HTML content.
gotmpl is a simple command line tool that will substitute the variables from a data file into a Go text template file. Get it: Use it: Data file may contain YAML, JSON, HCL or TOML. Gotmpl tries the parsers in that order and takes the result of the first one that doesn't complain. Use -logtostderr option if having problems. Template syntax defined here: https://godoc.org/text/template
Package docked provides types and functionality for analyzing and linting Dockerfiles. docked uses the Docker buildkit parser to retrieve the AST of an input Dockerfile. It also provides a simple API for defining and registering rules for processing of the AST. All in-built rules are built upon this API. See those defined under the validations package. An external YAML configuration is supported by docked.Config. The configuration allows for ignoring in-built rules, overriding priority of in-built rules, as well as defining custom rules based on the validations.SimpleRegexRule structure. Invoking docked.Docked#Analysis will use the list of in-built validation rules, and return a docked.AnalysisResult. The result should be walked programmatically to generate a report. Please see reports under the reporting package for examples. The HTML and JSON reporters under the reporter package provide implementations for use in the accompanying cli tool for use in CI/CD pipelines.
Package cnfg provides procedures to parse parse a slew of environment variables into a struct pointer. Use this package if your app uses a config file and you want to allow users to change or override the configurations in that file with environment variables. You can also use this app just to parse environment variables; handling a config file is entirely optional. Every member type is supported. If I missed one, please open an issue. If you need a non-base type supported (net.IP works already) please open an issue. New types are extremely easy to add. If this package interests you, pull requests and feature requests are welcomed! I consider this package the pinnacle example of how to configure Go applications from a file. You can put your configuration into any file format: XML, YAML, JSON, TOML, and you can override any struct member using an environment variable. I created this package because I got tired of writing custom env parser code for every app I make. This simplifies all the heavy lifting and I don't even have to think about it now. I hope you enjoy using this simplification as much as I do!
Package cnfg provides procedures to parse parse a slew of environment variables into a struct pointer. Use this package if your app uses a config file and you want to allow users to change or override the configurations in that file with environment variables. You can also use this app just to parse environment variables; handling a config file is entirely optional. Every member type is supported. If I missed one, please open an issue. If you need a non-base type supported (net.IP works already) please open an issue. New types are extremely easy to add. If this package interests you, pull requests and feature requests are welcomed! I consider this package the pinnacle example of how to configure Go applications from a file. You can put your configuration into any file format: XML, YAML, JSON, TOML, and you can override any struct member using an environment variable. I created this package because I got tired of writing custom env parser code for every app I make. This simplifies all the heavy lifting and I don't even have to think about it now. I hope you enjoy using this simplification as much as I do!
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Package sprbox is an agnostic config parser (supporting YAML, TOML, JSON and Environment vars) and a toolbox factory with automatic configuration based on your build environment.
Gypsy is a simplified YAML parser written in Go. It is intended to be used as a simple configuration file, and as such does not support a lot of the more nuanced syntaxes allowed in full-fledged YAML. YAML does not allow indent with tabs, and GYPSY does not ever consider a tab to be a space character. It is recommended that your editor be configured to convert tabs to spaces when editing Gypsy config files. Gypsy understands the following to be a list: This is parsed as a `yaml.YamlList`, and can be retrieved from the `yaml.YamlNode.YamlList()` method. In this case, each element of the `yaml.YamlList` would be a `yaml.YamlScalar` whose value can be retrieved with the `yaml.YamlScalar.String()` method. Gypsy understands the following to be a mapping: A mapping is an unordered list of `key:value` pairs. All whitespace after the colon is stripped from the value and is used for alignment purposes during export. If the value is not a list or a map, everything after the first non-space character until the end of the line is used as the `yaml.YamlScalar` value. Gypsy allows arbitrary nesting of maps inside lists, lists inside of maps, and maps and/or lists nested inside of themselves. A map inside of a list: A list inside of a map: A list of lists: A map of maps: In the case of a map of maps, all sub-keys must be on subsequent lines and indented equally. It is allowable for the first key/value to be on the same line if there is more than one key/value pair, but this is not recommended. Values can also be expressed in long form (leading whitespace of the first line is removed from it and all subsequent lines). In the normal (baz) case, newlines are treated as spaces, all indentation is removed. In the folded case (bar), newlines are treated as spaces, except pairs of newlines (e.g. a blank line) are treated as a single newline, only the indentation level of the first line is removed, and newlines at the end of indented lines are preserved. In the verbatim (foo) case, only the indent at the level of the first line is stripped. The example: The YAML subset understood by Gypsy can be expressed (loosely) in the following grammar (not including comments): Any line where the first non-space character is a sharp sign (#) is a comment. It will be ignored. Only full-line comments are allowed.
Package fmatter is a simple YAML Front Matter parser, using the gopkg.in/yaml.v2 package.
Package yaml implements a koanf.Parser that parses YAML bytes as conf maps.
Package ffyaml provides a YAML config file parser.