[#1343] go.mod: Update api-go

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-08-29 15:45:33 +03:00 committed by Evgenii Stratonikov
parent 882c068410
commit 98fe24cdb7
13 changed files with 180 additions and 206 deletions

View file

@ -77,13 +77,13 @@ func add(cmd *cobra.Command, _ []string) {
cmd.Println("Node ID: ", resp.GetBody().GetNodeId())
}
func parseMeta(cmd *cobra.Command) ([]*tree.KeyValue, error) {
func parseMeta(cmd *cobra.Command) ([]tree.KeyValue, error) {
raws, _ := cmd.Flags().GetStringSlice(metaFlagKey)
if len(raws) == 0 {
return nil, nil
}
pairs := make([]*tree.KeyValue, 0, len(raws))
pairs := make([]tree.KeyValue, 0, len(raws))
for i := range raws {
k, v, found := strings.Cut(raws[i], "=")
if !found {
@ -94,7 +94,7 @@ func parseMeta(cmd *cobra.Command) ([]*tree.KeyValue, error) {
pair.Key = k
pair.Value = []byte(v)
pairs = append(pairs, &pair)
pairs = append(pairs, pair)
}
return pairs, nil