Categorygithub.com/nishanths/dedupimport
repositorypackage
0.0.0-20200518094827-d51e321f8e9e
Repository: https://github.com/nishanths/dedupimport.git
Documentation: pkg.go.dev

# README

dedupimport

Build Status Godoc

Remove duplicate imports that have the same import path but different import names.

go get -u github.com/nishanths/dedupimport

See godoc for flags and usage.

Example

Given the file

package pkg

import (
	"code.org/frontend"
	fe "code.org/frontend"
)

var client frontend.Client
var server fe.Server

running dedupimport on it with default options

dedupimport file.go

will produce

package pkg

import (
	"code.org/frontend"
)

var client frontend.Client
var server frontend.Server