diff --git a/cmd/authmate/main.go b/cmd/authmate/main.go index 3dcaef0..8eab65f 100644 --- a/cmd/authmate/main.go +++ b/cmd/authmate/main.go @@ -245,8 +245,9 @@ It will be ceil rounded to the nearest amount of epoch.`, } agent := authmate.New(log, neoFS) - var containerID cid.ID + var containerID *cid.ID // keep nil value if container flag is not set if len(containerIDFlag) > 0 { + containerID = new(cid.ID) if err = containerID.DecodeString(containerIDFlag); err != nil { return cli.Exit(fmt.Sprintf("failed to parse auth container id: %s", err), 3) } @@ -282,7 +283,7 @@ It will be ceil rounded to the nearest amount of epoch.`, issueSecretOptions := &authmate.IssueSecretOptions{ Container: authmate.ContainerOptions{ - ID: &containerID, + ID: containerID, FriendlyName: containerFriendlyName, PlacementPolicy: containerPlacementPolicy, },