Skip to content

Magaming/gotests-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

gotests-templates

custom templates for gotests

  • using go-cmp
  • custom error message

example

default:
  t.Errorf("`StructName`.`MethodName` = %v, want %v", got, tt.want)

custom: 
  t.Errorf("`StructName`.`MethodName` got: %#v, want: %#v", got, tt.want)

Usage in Visual Studio Code

  1. Add [vscode-go] extension
  2. Clone this repository
  3. Add config to setting.json
"go.generateTestsFlags": [
  "-template_dir",
  "/your_local_directory/gotests-templates/templates"
]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published