This is a very simple module that can be used to print a string as all '*' characters, although this is configurable.
go get github.com/andrewheberle/redacted-stringUsage can be as simple as using the Redact call as follows:
fmt.Println(redacted.Redact("a sensitive string"))
// Output: ********Or you may customise the behaviour as follows:
censor := redacted.New("a sensitive string", redacted.WithCharacter('!'), redacted.WithLength(12))
// Output: !!!!!!!!!!!!