Skip to content

Commit

Permalink
Modify docs color/cleanup
Browse files Browse the repository at this point in the history
Modify the color of the docs to be less offensive (red is too much).

Add some admonitions to the docs, shuffle things around, fix some missing bits.
  • Loading branch information
LandonTClipp committed Feb 11, 2023
1 parent 1a81a49 commit a88d567
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If a parameter is named `with-expecter` and we want a value of `True`, then thes
| source | value |
|--------|-------|
| command line | `--with-expecter=true` |
| Environment variable | `MOCKERY_WITH_EXPECTER=` |
| Environment variable | `MOCKERY_WITH_EXPECTER=True` |
| yaml | `with-expecter: True` |

Recommended Basic Config
Expand Down
4 changes: 0 additions & 4 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,3 @@ proxyMock.On("passthrough", mock.AnythingOfType("context.Context"), mock.Anythin
return s
})
```

### Note

For mockery to correctly generate mocks, the command has to be run on a module (i.e. your project has to have a go.mod file)
6 changes: 4 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ Visit the [releases page](https://github.com/vektra/mockery/releases) to downloa
Supported, but not recommended: [see wiki page](https://github.com/vektra/mockery/wiki/Installation-Methods#go-install) and [related discussions](https://github.com/vektra/mockery/pull/456).

go install github.com/vektra/mockery/v2@v2.20.0

Do _not_ use `@latest` as this will pull from the latest, potentially untagged, commit on master.

!!! warning

Do _not_ use `@latest` as this will pull from the latest, potentially untagged, commit on master.

### Docker

Expand Down
8 changes: 7 additions & 1 deletion docs/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ $ mockery
09 Feb 23 22:47 CST INF Generating mock dry-run=false interface=A qualified-name=github.com/vektra/mockery/v2/pkg/fixtures version=v2.18.0
```

Note that in some cases, using `//go:generate` may turn out to be slower than running for entire packages. `go:generate` calls mockery once for each `generate` directive, which means that mockery may need to parse the package multiple times, which is wasteful. Good judgement is recommended when determining the best option for your own project.
!!! note

Note that in some cases, using `//go:generate` may turn out to be slower than running for entire packages. `go:generate` calls mockery once for each `generate` directive, which means that mockery may need to parse the package multiple times, which is wasteful. Good judgement is recommended when determining the best option for your own project.

!!! note

For mockery to correctly generate mocks, the command has to be run on a module (i.e. your project has to have a go.mod file)
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ theme:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: red
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: red
toggle:
icon: material/brightness-4
name: Switch to light mode
Expand All @@ -34,11 +32,13 @@ theme:
- navigation.tracking
- toc.follow
markdown_extensions:
- admonition
- attr_list
- md_in_html
- pymdownx.highlight:
anchor_linenums: true
auto_title: true
- pymdownx.details
- pymdownx.superfences
- toc:
permalink: true
Expand Down

0 comments on commit a88d567

Please sign in to comment.