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.
 
 
 

16 lines
543 B

package main
// writeKV is an internal func that ensures KVStore values get written consistently
func (b *bot) writeKV(key string, value string) error {
_, err := b.k.KVPut(&b.config.KVStoreTeam, b.k.Username, key, value)
if err != nil {
return err
}
return nil
}
// getGV is an internal function that ensures KVStore values are retreived consistently
func (b *bot) getKV(key string) (value string, revision int, err error) {
res, err := b.k.KVGet(&b.config.KVStoreTeam, b.k.Username, key)
return res.EntryValue, res.Revision, err
}