forked from TrueCloudLab/frostfs-node
[#1343] go.mod: Update api-go
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
882c068410
commit
98fe24cdb7
13 changed files with 180 additions and 206 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue