简体   繁体   中英

How to run goimports on all folders except Godeps and .git?

如何在所有文件夹上运行goimports ,除了来自 Makefile 的 Godeps 和 .git?

使用find列出所有go文件并在其上运行命令goimports -w

find . -name \*.go -not -path <FOLDER TO IGNORE> -not -path <ANOTHER FOLDER TO IGNORE> -exec goimports -w {} \;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM