Masking any character with Go language.
You must install this package into your module
go get github.com/pandudpn/go-masking
After installing, you can run code like this
package main
import (
masking "github.com/pandudpn/go-masking"
"fmt"
)
func main() {
// example want to mask password
pwd := "abcdefghijklmnopqrstuvwxyz"
result := masking.String(masking.Password, pwd) // will return *********
fmt.Println(result)
}
Or you can check the Example.