MCPcopy Create free account
hub / github.com/exercism/cli / Redact

Function Redact

debug/debug.go:92–96  ·  view source on GitHub ↗

Redact masks the given token by replacing part of the string with *

(token string)

Source from the content-addressed store, hash-verified

90
91// Redact masks the given token by replacing part of the string with *
92func Redact(token string) string {
93 str := token[4 : len(token)-3]
94 redaction := strings.Repeat("*", len(str))
95 return string(token[:4]) + redaction + string(token[len(token)-3:])
96}

Callers 3

newConfigurationStatusFunction · 0.92
DumpRequestFunction · 0.85
TestRedactFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestRedactFunction · 0.68