Skip to content

adzimzf/gtag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gtag

gtag is a simple tool for Golang tag, currently only support for tag formatter.

it'll transform your mess struct tag into beauty one

Before

Installation

This tool requires Go installed. To get the latest released version use:

GO111MODULE=off go get github.com/adzimzf/gtag/cmd/gtag
go install github.com/adzimzf/gtag/cmd/gtag

Integration

  • Goland (Jetbrains Go IDE)

    1. To integrate with Goland you need file watcher plugin
    2. Go to file watcher setting
    3. Click + button or press Alt+Insert
    4. Select custom
    5. Fill the program input field with <Your go bin location>/gtag

      Goland Configuration

  • VSCode

    1. To integrate with VSCode you need this plugin
    2. After you have already installed it, press CTRL+P then search setting.json to edit your file configuration
    3. Add the file with this json
      "runOnSave.commands": [
              {
                  "match": ".*\\.go$",
                  "notMatch": "[\\\\\\/]_[^\\\\\\/]*\\.go$",
                  "command": "gtag -i=${file} -w",
                  "runIn": "backend"
              },
          ]
    4. Save it, and whenever you save it'll reformat your struct tags

About

gtag is a simple tool for Golang tag.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published