清理文件

This commit is contained in:
chai2010
2022-08-04 15:15:13 +08:00
parent 06a1bdf735
commit 3a20d238d9
83 changed files with 25 additions and 63507 deletions

View File

@@ -402,7 +402,7 @@ $ go list -json hash
$ go list -f '{{join .Deps " "}}' strconv
errors math runtime unicode/utf8 unsafe
```
{% endraw %}
译注上面的命令在Windows的命令行运行会遇到`template: main:1: unclosed action`的错误。产生这个错误的原因是因为命令行对命令中的`" "`参数进行了转义处理。可以按照下面的方法解决转义字符串的问题:
@@ -410,7 +410,7 @@ errors math runtime unicode/utf8 unsafe
```
$ go list -f "{{join .Deps \" \"}}" strconv
```
{% endraw %}
下面的命令打印compress子目录下所有包的导入包列表
@@ -423,7 +423,7 @@ compress/gzip -> bufio compress/flate errors fmt hash hash/crc32 io time
compress/lzw -> bufio errors fmt io
compress/zlib -> bufio compress/flate errors fmt hash hash/adler32 io
```
{% endraw %}
译注Windows下有同样有问题要避免转义字符串的干扰
@@ -431,7 +431,7 @@ compress/zlib -> bufio compress/flate errors fmt hash hash/adler32 io
```
$ go list -f "{{.ImportPath}} -> {{join .Imports \" \"}}" compress/...
```
{% endraw %}
`go list`命令对于一次性的交互式查询或自动化构建或测试脚本都很有帮助。我们将在11.2.4节中再次使用它。每个子命令的更多信息,包括可设置的字段和意义,可以用`go help list`命令查看。