VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


Go 에 대해 풍부한 언어 지원을 위한 확장입니다.


링크 : https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go





Go 가 설치되어 있어야 합니다. 

현재 설치된 Go path 는 Go: Current GOPATH 명령어로 확인 가능합니다.

  • Auto Completion of symbols as you type (using gocode)
  • Signature Help for functions as you type (using gogetdoc or godef+godoc)
  • Quick Info on the symbol as you hover over it (using gogetdoc or godef+godoc)
  • Go to or Peek Definition of symbols (using gogetdoc or godef+godoc)
  • Find References of symbols and Implementations of interfaces (using guru)
  • Go to symbol in file or see the file outline (using go-outline)
  • Go to symbol in workspace (using go-symbols)
  • Toggle between a Go program and the corresponding test file.
  • Code Snippets for quick coding
  • Format code on file save as well as format manually (using goreturns or goimports or gofmt)
  • Symbol Rename (using gorename. Note: For Undo after rename to work in Windows you need to have difftool in your path)
  • Add Imports to current file (using gopkgs)
  • Add/Remove Tags on struct fields (using gomodifytags)
  • Generate method stubs for interfaces (using impl)
  • Fill struct literals with default values (using fillstruct)
  • Build-on-save to compile code and show build errors. (using go build and go test)
  • Vet-on-save to run go vet and show errors as warnings
  • Lint-on-save to show linting errors as warnings (using golintgometalintermegacheckgolangci-lint or revive)
  • Semantic/Syntactic error reporting as you type (using gotype-live)
  • Run Tests under the cursor, in current file, in current package, in the whole workspace using either commands or codelens
  • Run Benchmarks under the cursor using either commands or codelens
  • Show code coverage either on demand or after running tests in the package.
  • Generate unit tests skeleton (using gotests)
  • Debug your code, binaries or tests (using delve)
  • Install/Update all dependent Go tools
  • Upload to the Go Playground (using goplay)

In addition to integrated editing features, the extension also provides several commands in the Command Palette for working with Go files:

  • Go: Add Import to add an import from the list of packages in your Go context
  • Go: Current GOPATH to see your currently configured GOPATH
  • Go: Test at cursor to run a test at the current cursor position in the active document
  • Go: Test Package to run all tests in the package containing the active document
  • Go: Test File to run all tests in the current active document
  • Go: Test Previous to run the previously run test command
  • Go: Test All Packages in Workspace to run all tests in the current workspace
  • Go: Generate Unit Tests For Package Generates unit tests for the current package
  • Go: Generate Unit Tests For File Generates unit tests for the current file
  • Go: Generate Unit Tests For Function Generates unit tests for the selected function in the current file
  • Go: Install Tools Installs/updates all the Go tools that the extension depends on
  • Go: Add Tags Adds configured tags to selected struct fields.
  • Go: Remove Tags Removes configured tags from selected struct fields.
  • Go: Generate Interface Stubs Generates method stubs for given interface
  • Go: Fill Struct Fills struct literal with default values
  • Go: Run on Go Playground Upload the current selection or file to the Go Playground


+ Recent posts