Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>gotNew to Visual Studio Code? Get it now.
got

got

Johannes Krämer

|
229 installs
| (0) | Free
Golang Unit Test Generation
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Got, a simple tool for generating golang unit tests

Got creates a _test.go for the currently open .go file.
This new file will include unit test stubs following the convention func Test<OriginalFunctionOrMethodName>(t *testing.T){}.
Optionally, it generates the data structure for table driven tests following the convention type <originalFunctionOrMethodName>Tests struct {}.

Commands

got: create unit tests (simple) creates test functions
got: create unit tests (table driven) creates test functions and the skeleton for table driven tests
got: create unit tests (table driven) + http mock server creates test functions and the skeleton for table driven tests + the skeleton for a http mock server

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft