goimports-reviser

command module
v2.0.0-...-f57e318 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 9 Imported by: 0

README

goimports-reviser

Documentation

Overview

Tool for Golang to sort goimports by 3-4 groups: std, general, local(which is optional) and project dependencies. It will help you to keep your code cleaner.

Example:

goimports-reviser -project-name github.com/incu6us/goimports-reviser -file-path ./reviser/reviser.go -rm-unused

Input:

import (
	"log"

	"github.com/incu6us/goimports-reviser/testdata/innderpkg"

	"bytes"

	"github.com/pkg/errors"
)

Output:

 import (
	"bytes"
	"log"

	"github.com/pkg/errors"

	"github.com/incu6us/goimports-reviser/testdata/innderpkg"
 )

If you need to set package names explicitly(in import declaration), you can use additional option `-set-alias`.

More:

goimports-reviser -h

Directories

Path Synopsis
pkg
std
Code generated by ./gen/gen.go DO NOT EDIT.
Code generated by ./gen/gen.go DO NOT EDIT.

Jump to

Keyboard shortcuts

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