我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何使Gofmt忽略供应商文件夹

For go fmt command it is easy to do as:

go fmt $$(go list ./...| grep -v /vendor/)

How can do it with gofmt which recursive by default? In gofmt, the default format is: use gofmt ., how can ignore vendor in this? Or is there way to use go list output for gofmt?

One way is gofmt -l (find . -type f -name '*.go'| grep -v "/vendor/"), is there an easier way?

近期文章

  • 如何在Go中将方法作为参数传递?
  • 无法导入cloud.google.com/go/storage
  • go build是否包含二进制非二进制文件? [重复]
  • 这是一个关于计算机组成原理相关问题
  • 如何从golang项目文件获取图像路径
  • Go代码程序无法在后台运行
  • 为什么安装后找不到xgo命令?
  • 关于字节顺序和标准库的问题?
  • IPv4正则表达式捕获地址的不正确部分
  • 如何在Golang中将函数应用于整数输入
  • 如何解决mysqldump错误:1044:选择数据库时,“拒绝用户'@'localhost'访问数据库'db_name'”
  • 我不能使用交叉编译器
  • 如何打开YAML文件,更改某些内容并将其保存回Go中?
  • 是否可以为Linux / ARM构建和运行Go插件?
  • 添加表达式“ fmt.Println()”时发生了什么
  • 文字模板无法使用某些单词
  • 在Go单元测试中使用两个不同的模拟
  • JAVA 正则表达式截取时间
  • 从Golang中的字节数组解压缩gzip
  • 从指针并发读取是否安全?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华