Last active
March 9, 2016 23:04
-
-
Save mvetsch/eadb38b07048305ba74f to your computer and use it in GitHub Desktop.
Use docker's fantastic namegenerator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget https://raw.githubusercontent.com/docker/docker/master/pkg/namesgenerator/names-generator.go 2> /dev/null | |
go get "github.com/docker/docker/pkg/random" | |
go get "github.com/docker/docker/pkg/namesgenerator" | |
cat > get-generated-name.go << EOF | |
package main | |
import "github.com/docker/docker/pkg/namesgenerator" | |
import "fmt" | |
func main() { | |
fmt.Printf(namesgenerator.GetRandomName(0) + "\n") | |
} | |
EOF | |
go build get-generated-name.go | |
./get-generated-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go must be installed.