[已解决] golang go test 是遇到报错 call has possible formatting directive %v

golang 运行 go test 时 遇到报错 call has possible formatting directive %v 怎么解决

Println call has possible formatting directive %v

go test 中使用 fmt.Print(“%v”) 报错

问题

Println call has possible formatting directive %v

go test 中不能使用 fmt.PrintLn(“%v”, v)

解决否

已解决

方案

使用 fmt.Printf(“%+v”, v)

发表评论

邮箱地址不会被公开。 必填项已用*标注