Skip to content

Commit

Permalink
add deprecations for custom InterfaceName template variables
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSova committed Sep 18, 2023
1 parent 344a291 commit 7e62022
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ Variables that are marked as being templated are capable of using mockery-provid
| InterfaceDir | The directory path of the original interface being mocked. This can be used as <br>`#!yaml dir: "{{.InterfaceDir}}"` to place your mocks adjacent to the original interface. This should not be used for external interfaces. |
| InterfaceDirRelative | The directory path of the original interface being mocked, relative to the current working directory. If the path cannot be made relative to the current working directory, this variable will be set equal to `PackagePath` |
| InterfaceName | The name of the original interface being mocked |
| InterfaceNameCamel | Converts a string `interface_name` to `InterfaceName` |
| InterfaceNameLowerCamel | Converts `InterfaceName` to `interfaceName` |
| InterfaceNameSnake | Converts `InterfaceName` to `interface_name` |
| InterfaceNameLower | Converts `InterfaceName` to `interfacename` |
| InterfaceNameCamel | Converts a string `interface_name` to `InterfaceName`. <b>Deprecated</b>: use `{{ .InterfaceName \| camelcase }}` instead |
| InterfaceNameLowerCamel | Converts `InterfaceName` to `interfaceName` . <b>Deprecated</b>: use `{{ .InterfaceName \| camelcase \| firstLower }}` instead |
| InterfaceNameSnake | Converts `InterfaceName` to `interface_name` . <b>Deprecated</b>: use `{{ .InterfaceName \| snakecase }}` instead |
| InterfaceNameLower | Converts `InterfaceName` to `interfacename` . <b>Deprecated</b>: use `{{ .InterfaceName \| lower }}` instead |
| Mock | A string that is `Mock` if the interface is exported, or `mock` if it is not exported. Useful when setting the name of your mock to something like: <br>`#!yaml mockname: "{{.Mock}}{{.InterfaceName}}"`<br> This way, the mock name will retain the exported-ness of the original interface. |
| MockName | The name of the mock that will be generated. Note that this is simply the `mockname` configuration variable |
| PackageName | The name of the package from the original interface |
Expand Down

0 comments on commit 7e62022

Please sign in to comment.