package entity import ( "git.sxidc.com/go-tools/utils/strutils" "github.com/pkg/errors" ) const ( fieldIDLen = 32 ) func CheckID(domainCNName string, fieldCNName string, id string) error { if strutils.IsStringEmpty(id) { return errors.New(domainCNName + fieldCNName + "为空") } if len(id) != fieldIDLen { return errors.New(domainCNName + fieldCNName + "长度不正确") } return nil }