Exemple #1
0
// main is the entrypoint
func main() {
	scanner := bufio.NewScanner(os.Stdin)

	anonuuid := anonuuid.New()

	for scanner.Scan() {
		line := scanner.Text()
		fmt.Println(anonuuid.Sanitize(line))
	}
}
Exemple #2
0
func action(c *cli.Context) {
	scanner := bufio.NewScanner(os.Stdin)

	anonuuid := anonuuid.New()

	anonuuid.Hexspeak = c.Bool("hexspeak")
	anonuuid.Random = c.Bool("random")
	anonuuid.Prefix = c.String("prefix")

	for scanner.Scan() {
		line := scanner.Text()
		fmt.Println(anonuuid.Sanitize(line))
	}
}