Skip to content

Commit

Permalink
README: Fix typos & run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-petit committed Oct 19, 2023
1 parent f5ccfc9 commit b5b434b
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cfg

Convinient configuration builder. Inject data straight to your
Convenient configuration builder. Inject data straight to your
configuration struct from various input source (env, flags, files, you
name it!)

Expand Down Expand Up @@ -28,10 +28,9 @@ TODO

TODO


## Example

The simpliest way to use upfluence/cfg is:
The simplest way to use upfluence/cfg is:

```go
package main
Expand Down Expand Up @@ -69,21 +68,21 @@ By default only the `env` and `flags` provider are used.

You can now provide configuration to your application through:

* `env`:
- `env`:

```
$ ARG_1=foo ARG_2 ./example
Arg1: foo, Arg2: bar
```

* `flags`:
- `flags`:

```
$ ./example --arg1 foo --arg2 bar
Arg1: foo, Arg2: bar
```

* `flags:booleans`:
- `flags:booleans`:

```
$ ./example --arg1 --no-arg2
Expand All @@ -93,26 +92,27 @@ Arg1: TRUE, Arg2: FALSE
## Roadmap

So far the implementation is pretty minimal. There is two main
kinds of improvment.
kinds of improvement.

### Field parsing

The current implementation parses:
* `string`
* all int and float types
* `bool`
* `time.Duration` using `time.ParseDuration`
* `time.Time` based on the format `2006-01-02T15:04:05`
* sub structs
* slices
* maps
* All the value or pointer to a value that implements:
* `json.Unmarshaler`
* `encoding.TextUnmarshaler`
* `interface { Parse(string) error }`

- `string`
- all int and float types
- `bool`
- `time.Duration` using `time.ParseDuration`
- `time.Time` based on the format `2006-01-02T15:04:05`
- sub structs
- slices
- maps
- All the value or pointer to a value that implements:
- `json.Unmarshaler`
- `encoding.TextUnmarshaler`
- `interface { Parse(string) error }`

### Other provider

A few more provider are on the roadmap.

* More file types. We could include YAML and TOML file parsing provider
- More file types. We could include YAML and TOML file parsing provider

0 comments on commit b5b434b

Please sign in to comment.