MCPcopy Create free account
hub / github.com/docker/docker-agent / truncateToken

Function truncateToken

cmd/root/debug_oauth.go:126–132  ·  view source on GitHub ↗
(token string)

Source from the content-addressed store, hash-verified

124}
125
126func truncateToken(token string) string {
127 const previewLen = 10
128 if len(token) <= previewLen*2 {
129 return token
130 }
131 return token[:previewLen] + "..." + token[len(token)-previewLen:]
132}
133
134func newDebugOAuthRemoveCmd() *cobra.Command {
135 return &cobra.Command{

Callers 2

printOAuthListJSONFunction · 0.85
printOAuthListTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected