grouper

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

README

GitHub Releases
license
build status

Example

  • before
package main

import(
	"bytes"
	"errors"

	"golang.org/x/tools/go/ast/astutil"

	"fmt"
	"golang.org/x/tools/imports"
)
...
  • after grouper run...
package main

import (
        "bytes"
        "errors"
        "fmt"

        "golang.org/x/tools/go/ast/astutil"
        "golang.org/x/tools/imports"
)
  • in case of goimports...
package main

import(
        "bytes"
        "errors"

        "golang.org/x/tools/go/ast/astutil"

        "fmt"

        "golang.org/x/tools/imports"
)

Features

  • grouping/ordering import, if blank line exists before/after paths.

Usage

  • set directories or files as arguments of the command.
  • if you set the prefix to -local option, the packages which beginning with that prefix put after 3rd-party packages.
GLOBAL OPTIONS:
   --local value, -l value  specify imports prefix beginning with this string after 3rd-party packages. especially your own organization name. comma-separated list
   --write, -w              write result source to original file instead od stdout (default: false)

Install

with go command.

$  go install github.com/tommy-sho/grouper

License

MIT

Author

tommy-sho

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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