Debian Codegraph @

cmd/petname/main.go

raw symbols SCIP
1 /*
2 petname: binary for generating human-readable, random names
3 for objects (e.g. hostnames, containers, blobs)
4
5 Copyright 2014 Dustin Kirkland <[email protected]>
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 */
19
20 package main
21
22 import (
23 "flag"
24 "fmt"
25 "github.com/dustinkirkland/golang-petname"
26 )
27
28 var (
29 words = flag.Int("words", 2, "The number of words in the pet name")
30 separator = flag.String("separator", "-", "The separator between words in the pet name")
31 )
32
33 func main() {
34 flag.Parse()
35 fmt.Println(petname.Generate(*words, *separator))
36 }