github.com/sandwich-go/boost@v1.3.29/misc/xtag/valid_test.go (about)

     1  package xtag
     2  
     3  import (
     4  	. "github.com/smartystreets/goconvey/convey"
     5  	"testing"
     6  )
     7  
     8  func TestTag(t *testing.T) {
     9  	Convey("valid tag", t, func() {
    10  		t.Log(ValidateStructTag("a:1"))
    11  		So(ValidateStructTag("a:1"), ShouldNotBeNil)
    12  		So(ValidateStructTag(`json:"value"`), ShouldBeNil)
    13  		So(ValidateStructTag(`a:"value"`), ShouldBeNil)
    14  	})
    15  }