Skip to content

A simple tool to help you change golang package name.

Notifications You must be signed in to change notification settings

yushuailiu/gorename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gorename

English Document

gorename是一个修改 golang 包名的小工具

安装和使用

要使用gorename首先需要安装 golang,并且配置环境变量 $GOPATH$GOBIN,然后就可以执行以下命令安装:

go get github.com/yushuailiu/gorename

现在就可以使用 gorename 了,比如你想要把目录/user/code/test下的所有文件包含的包名 old/package/name 修改为 new/package/name那么执行以下 命令即可:

gorename --source /user/code/test old/package/name new/package/name

你也可以执行 gorename --help 查看帮助文档:

$ gorename --help                                                                                                                                                           [17:14:31]
NAME:
   gorename - Rename golang package

USAGE:
   main [global options] command [command options] [source file or directory path] [old package name] [new package name]

VERSION:
   0.0.1

AUTHOR:
   YuShuai Liu <admin@liuyushuai.com>

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --source value, -s value  source package path or file path (default: "./")
   --help, -h                show help
   --version, -v             print the version

About

A simple tool to help you change golang package name.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages