|
1 | 1 | # Examples
|
2 | 2 |
|
3 |
| -There are two target files: `config.go` and `complex.go`: |
4 |
| -- `config.go` has a simple type `Config` with a few documented fields. It has |
| 3 | +There are few target files: |
| 4 | +- [`config.go`](./config.go) has a simple type `Config` with a few documented fields. It has |
5 | 5 | `go:generate` directives to call `envdoc` with different params to build
|
6 |
| - documentation in different formats. |
7 |
| -- `complex.go` has multiple types, and this file tries to cover all possible cases |
8 |
| - of field tags, type comments, etc. Also, it has more `go:generate` directives to |
| 6 | + documentation in different formats: [`config.md`](./config.md), [`config.html`](./config.html) and [`config.txt`](./config.txt). |
| 7 | +- [`complex.go`](./complex.go) has multiple types, and this file tries to cover all possible cases |
| 8 | + of field tags and type comments. Also, it has more `go:generate` directives to |
9 | 9 | produce documentation not only in different formats but it uses different options
|
10 |
| - for `envdoc`, e.g. there you can find `-no-styles` and `-env-prefix` options. |
| 10 | + for `envdoc`, e.g. there you can find `-no-styles` and `-env-prefix` options: [`complex.md`](./complex.md), [`complex.html`](./complex.html), |
| 11 | + [`complex.txt`](./complex.txt) for default markdown, HTML and text documentation files; [`x_complex.md`](./x_complex.md) with |
| 12 | + envprefix parameter; [`complex-nostyle.html`](./complex-nostyle.html) is HTML documentation without built-in styles. |
| 13 | +- [`envprefix.go`](./envprefix.go) has nested config structure with `envPrefix` tag for structure field. It generates [`envprefix.md`](./envprefix.md). |
| 14 | + |
| 15 | +The examples dir has helper script files as well: |
| 16 | + - `build-examples.sh` - you can modify any example go file and regenerate all documentation outputs by running it via `./build-examples.sh`. |
| 17 | + - `clean.sh` - removes all documentation files. |
0 commit comments