Skip to main content

TYPE

Syntax​

TYPE key

Module​

generic

Categories​

fast keyspace read

Description​

Returns the string representation of the value type stored at the key. The types that can be returned are string, integer, float, list, set, set, and hash.

Examples​

Retrieve the type of the value stored at key:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
type, err := db.Type("key")