<commit_before>## setting

A simple utility to load your configuration from the environment (with optional defaults)

[![Circle CI](https://circleci.com/gh/ryanlower/setting.svg?style=svg)](https://circleci.com/gh/ryanlower/setting)

```go
type Config struct {
  port string `env:"PORT" default:"3000"`
}

config := new(Config)
setting.Load(config)

// If the PORT environment variable is set, `config.port` will
// now be its value (`os.Getenv("PORT")`). Otherwise it will
// be "3000"
```

Both `env` and `default` are optional:
```go
type Config struct {
  name string `env:"NAME"`
  city string `default:"San Francisco"`
}

// `config.name` will be the NAME environment variable value if
// present, or the zero value if not
// `config.city` will be "San Francisco"
```

### Limitations
Setting currently only supports string type fields! If you need another type open an issue or a pull request :smile:<commit_msg>Use exported field names in README, so examples actually work!<commit_after>## setting

A simple utility to load your configuration from the environment (with optional defaults)

[![Circle CI](https://circleci.com/gh/ryanlower/setting.svg?style=svg)](https://circleci.com/gh/ryanlower/setting)

```go
type Config struct {
  Port string `env:"PORT" default:"3000"`
}

config := new(Config)
setting.Load(config)

// If the PORT environment variable is set, `config.Port` will
// now be its value (`os.Getenv("PORT")`). Otherwise it will
// be "3000"
```

Both `env` and `default` are optional:
```go
type Config struct {
  Name string `env:"NAME"`
  City string `default:"San Francisco"`
}

// `config.Name` will be the NAME environment variable value if
// present, or the zero value if not
// `config.City` will be "San Francisco"
```

### Limitations
Setting currently only supports string type fields! If you need another type open an issue or a pull request :smile:
{'fraction_non_alphanumeric': 0.13036565977742448, 'fraction_numerical': 0.008479067302596715, 'mean_word_length': 4.585798816568047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '6085744', 'n_tokens_mistral': 580, 'n_tokens_neox': 542, 'n_words': 220}