gtag

package module
v0.0.0-...-5dfba8e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

README

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FileSource   string
	IsOverWrite  bool
	FilterStruct []string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL