Package actionlint is the implementation of actionlint linter. It's a static checker for GitHub Actions workflow files. https://github.com/rhysd/actionlint actionlint is a command line tool but it also provides Go API for Go programs. It includes a workflow file parser built on top of go-yaml/yaml, lexer/parser/checker for expressions embedded by ${{ }} placeholder, popular actions data, available contexts information, etc. To run the linter, Linter is the struct which manages the entire linter lifecycle. Please see the first example. actionlint also provides the flexibility to add your own rules by implementing Rule interface. Please read the YourOwnRule example. The version is for the command line tool. So it does not represent the version of the library. It means that the library does not follow semantic versioning and any patch version bump may introduce some breaking changes. Minimum supported Go version is written in go.mod file in this library. That said, older Go versions are actually not tested on CI. Last two major Go versions are recommended because they're tested on CI. For example, when the latest Go version is v1.22, v1.21 and v1.22 are nice to use. https://github.com/rhysd/actionlint/blob/main/go.mod All documentations for actionlint can be found in the following page. https://github.com/rhysd/actionlint/tree/main/docs This library is provided under the MIT license. > Copyright (c) 2021 rhysd Full text can be found in the following page. https://github.com/rhysd/actionlint/blob/main/LICENSE.txt
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 yamagiconf provides an opinionated configuration file parser using a subset of YAML and Go struct type restrictions to allow for consistent configuration files, easy validation and good error reporting. Supports primitive `env` struct tags used to overwrite fields from env vars. Also supports github.com/go-playground/validator struct tags.
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!
Package yaml implements a koanf.Parser that parses YAML bytes as conf maps.
Author: Enes Uysal Author: Enes Uysal Author: Enes Uysal Author: Enes Uysal Author: Enes Uysal
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 go-yaml implements a YAML AST parser for Go.
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 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 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.
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 gofigure parses configuration files. An application might use this instead of parsing JSON, YAML, or many other alternatives. Our primary goals include: Our definition of "human-friendly" is opinionated. It basically means a configuration file format that supports comments, and is not sensitive to whitespace or indentation. The motivation to avoid third-party dependencies is to minimize the amount of code that needs to be audited, in particular for secure applications where the size of a software bill of materials may be a concern. To accomplish these goals, the configuration syntax is based on the Go (golang) language. This allows us to use Go's parser, already part of the standard library, rather than third-party imports. And Go's syntax meets our standard for user-friendliness. The supported syntax supports, for example, Gofigure provides a multiplexer, with a simple scheme in which a handler is called for each value in a configuration file. A handler is called if it is the best match for a "path" in the configuration file. In the example above, "local = env {}" is a fully-qualified path that matchs only the first item, while "env" is a path that matches all the `env{...}` objects. Above, "env" is the path to match, `HandleEnv` is the application-provided handler function, and `gofigure.Object` instructs gofigure to unmarshal the value as an object. Under the hood, gofigure uses "encoding/json" for decoding into Go structs, and Object, Array, and Scalar tell gofigure what kind of value to expect. For each match in the configuration file, a handler is passed the full route and value. In this example, a route would be ["local", "=", "env", "{}"] and the same handler would be called again with a route starting "prod".
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.