github.com/lino-network/lino@v0.6.11/types/query.go (about)

     1  package types
     2  
     3  import sdk "github.com/cosmos/cosmos-sdk/types"
     4  
     5  func CheckPathContentAndMinLength(path []string, expectMinLength int) sdk.Error {
     6  	if len(path) < expectMinLength {
     7  		return ErrInvalidQueryPath()
     8  	}
     9  	for i := 0; i < expectMinLength; i++ {
    10  		if path[i] == "" {
    11  			return ErrInvalidQueryPath()
    12  		}
    13  	}
    14  	return nil
    15  }