Skip to content

Commit ad23399

Browse files
committed
fixed nil pointer in create
1 parent fdacb36 commit ad23399

File tree

1 file changed

+2
-1
lines changed
  • internal/cmd/beta/logs/access_token/create

1 file changed

+2
-1
lines changed

internal/cmd/beta/logs/access_token/create/create.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66

77
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
8+
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
89

910
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
1011
cliErr "github.com/stackitcloud/stackit-cli/internal/pkg/errors"
@@ -154,7 +155,7 @@ func outputResult(p *print.Printer, outputFormat, instanceLabel string, accessTo
154155
return fmt.Errorf("access token cannot be nil")
155156
}
156157
return p.OutputResult(outputFormat, accessToken, func() error {
157-
p.Outputf("Created access token for log instance %q.\n\nID: %s\nToken: %s\n", instanceLabel, *accessToken.Id, *accessToken.AccessToken)
158+
p.Outputf("Created access token for log instance %q.\n\nID: %s\nToken: %s\n", instanceLabel, utils.PtrValue(accessToken.Id), utils.PtrValue(accessToken.AccessToken))
158159
return nil
159160
})
160161
}

0 commit comments

Comments
 (0)