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)
- Add [vscode-go] extension
- Clone this repository
- Add config to setting.json
"go.generateTestsFlags": [
"-template_dir",
"/your_local_directory/gotests-templates/templates"
]