You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
429 B

  1. package types
  2. // KVPairInt is a helper method to build KV pair with an integer value.
  3. func KVPairInt(key string, val int64) *KVPair {
  4. return &KVPair{
  5. Key: key,
  6. ValueInt: val,
  7. ValueType: KVPair_INT,
  8. }
  9. }
  10. // KVPairString is a helper method to build KV pair with a string value.
  11. func KVPairString(key, val string) *KVPair {
  12. return &KVPair{
  13. Key: key,
  14. ValueString: val,
  15. ValueType: KVPair_STRING,
  16. }
  17. }