diff --git a/cmd/generate.go b/cmd/generate.go index b8d5967..3078d2e 100644 --- a/cmd/generate.go +++ b/cmd/generate.go @@ -35,7 +35,7 @@ func main() { } if count == 1 { - sentence, err := hq.Random() + sentence, err := hq.Hack() if err != nil { fmt.Println(err) os.Exit(1) @@ -45,7 +45,7 @@ func main() { } else { fmt.Println("") for i := 0; i < count; i++ { - sentence, err := hq.Random() + sentence, err := hq.Hack() if err != nil { fmt.Println(err) os.Exit(1) diff --git a/frontend/home.go b/frontend/home.go index 5c9c626..4999e9d 100644 --- a/frontend/home.go +++ b/frontend/home.go @@ -5,7 +5,7 @@ import ( ) func (f *Frontend) home(w http.ResponseWriter, r *http.Request) { - words, err := f.hq.Random() + words, err := f.hq.Hack() if err != nil { w.Write([]byte(err.Error())) return diff --git a/generic.go b/generic.go index 4e3cfd1..da1ea54 100644 --- a/generic.go +++ b/generic.go @@ -19,7 +19,7 @@ func NewGeneric(db database.DB) (HackerQuotes, error) { return &generic{db: db}, nil } -func (g *generic) Random() (string, error) { +func (g *generic) Hack() (string, error) { definite := rand.Int() % 2 == 0 hasAdj := rand.Int() % 2 == 0 plural := rand.Int() % 2 == 0 diff --git a/hacker.go b/hacker.go index e4b1ba1..603ea65 100644 --- a/hacker.go +++ b/hacker.go @@ -6,8 +6,8 @@ import ( ) type HackerQuotes interface { - // Random returns a completely randomized quote. - Random() (string, error) + // Hack returns a completely randomized quote. + Hack() (string, error) // Format returns a quote in the given format. Format(format string) (string, error)