Golic has two configurations .licignore and .golic.yaml. The first determines which files will be selected for license injection. The second contains

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-10-26 10:00:05

Golic has two configurations .licignore and .golic.yaml. The first determines which files will be selected for license injection. The second contains a configuration of license text and formatting rules.

.licignore determines which files will be selected for license injection. The syntax of the file is the same as for .gitignore. For simplicity, we have created inverse rules - we denied everything and allowed where to place license.

golic.yaml contains a configuration with license text and formatting rules. Golic uses embeded master configuration by default. The master configuration is compiled and goes with binary, so it can change from version to version. If you need to change configuration, you can override it. For example, you want to replace the license text, or extend with new file types. All you have to do is to create a .golic.yaml file in the project root. Golic will read it and overrides master configuration rules.

Example below overrides master configuration by adding apacheX licenses and sets new rule for *.go.txt and .mzm. For more details see master configuration example.

Leave a Comment