etcd: client: str: We do not want the prefix match
This was a likely copy+pasta error, since we match precise strings here. If we had two similarly prefixed strings, we'd have an error.
This commit is contained in:
@@ -62,7 +62,7 @@ func WatchStr(ctx context.Context, client interfaces.Client, key string) (chan e
|
||||
func GetStr(ctx context.Context, client interfaces.Client, key string) (string, error) {
|
||||
// new key structure is $NS/strings/$key = $data
|
||||
path := fmt.Sprintf("%s/strings/%s", ns, key)
|
||||
keyMap, err := client.Get(ctx, path, etcd.WithPrefix())
|
||||
keyMap, err := client.Get(ctx, path)
|
||||
if err != nil {
|
||||
return "", errwrap.Wrapf(err, "could not get strings in: %s", key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user