Skip to content

nishanths/dedupimport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Deduplicate named and unnamed imports of the same import path in Go files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages