<commit_before># cfg

A Go library to work with JSON configuration files

## Usage

```json
{
    "hello": "world",
    "welcome": {
        "bonjour": ["pays", "monde", "univers"],
    },
    "dang": 11
}
```
Define your struct. You can add the tag `cfg:"optionnal"` to any field except for numeric and boolean types as Go has default value for them, we can't check if the field is missing or not.
```go
type Conf struct {<commit_msg>Added godoc reference and installation step<commit_after># cfg

A Go library to work with JSON configuration files

[![GoDoc](https://godoc.org/gopkg.in/Gamoloco/cfg.v1?status.svg)](https://godoc.org/gopkg.in/Gamoloco/cfg.v1)

## Install

`go get gopkg.in/Gamoloco/cfg.v1`

## Usage

```json
{
    "hello": "world",
    "welcome": {
        "bonjour": ["pays", "monde", "univers"],
    },
    "dang": 11
}
```
Define your struct. You can add the tag `cfg:"optionnal"` to any field except for numeric and boolean types as Go has default value for them, we can't check if the field is missing or not.
```go
type Conf struct {
{'fraction_non_alphanumeric': 0.14083175803402648, 'fraction_numerical': 0.006616257088846881, 'mean_word_length': 3.6447368421052633, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2029259', 'n_tokens_mistral': 368, 'n_tokens_neox': 350, 'n_words': 132}