Golang Password Type A simple string type that masks its value when printed or encoded. func main() { foo := passwd.Password("Hello World") fmt.Println(foo) // Output: *** enc := json.NewEncoder(os.Stdout) enc.Encode(foo) // Output: "***" }