使用 go build 时没有收到警告消息

问题描述 投票:0回答:1
// test.go
package main

import "fmt"

func main() {
    fmt.Printf("%s", 0) // format error
}

使用

go build test.go
我根本没有收到任何警告消息或错误。我也没有在
go help build
中看到警告标志。我是不是错过了什么?

go
1个回答
0
投票

正如 Volker 提到

go test
自动运行
vet
;构建没有。

© www.soinside.com 2019 - 2024. All rights reserved.