go test skip some test

go test skip some test

Its easy to skip single test or many test,just add +build

// +build all

package tags

import "testing"

func TestA(t *testing.T) {}
// +build all feature2

package tags

import "testing"

func TestA(t *testing.T) {}
go test -v -tags all
go test -v -tags "feature1 feature2"

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 wind.kaisa@gmail.com

💰

×

Help us with donation