Initial commit
parent
b8ab3d0f32
commit
6eba445959
|
@ -0,0 +1,72 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"github.com/aws/aws-lambda-go/events"
|
||||
"github.com/aws/aws-lambda-go/lambda"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
var nouns = []string{}
|
||||
var verbs = []string{}
|
||||
var ends = []string{}
|
||||
var nends = []string{}
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
nouns, _ = readFile("nouns.txt")
|
||||
verbs, _ = readFile("verbs.txt")
|
||||
ends, _ = readFile("ends.txt")
|
||||
nends = append(nouns, ends...)
|
||||
}
|
||||
|
||||
func readFile(path string) ([]string, error) {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
var lines []string
|
||||
scanner := bufio.NewScanner(file)
|
||||
for scanner.Scan() {
|
||||
lines = append(lines, scanner.Text())
|
||||
}
|
||||
return lines, scanner.Err()
|
||||
}
|
||||
|
||||
func getWord(wordlist []string) string {
|
||||
return wordlist[rand.Intn(len(wordlist))]
|
||||
}
|
||||
|
||||
func genSwear() string {
|
||||
swear := "default"
|
||||
r := rand.Intn(4)
|
||||
switch r {
|
||||
case 1:
|
||||
swear = getWord(nouns) + "-" + getWord(verbs) + " " + getWord(nends)
|
||||
case 2:
|
||||
swear = getWord(nouns) + "-" + getWord(ends)
|
||||
case 3:
|
||||
swear = getWord(nouns) + "-" + getWord(verbs) + " " + getWord(nouns) + " " + getWord(ends)
|
||||
default:
|
||||
swear = getWord(nouns) + "-" + getWord(nends)
|
||||
}
|
||||
return strings.Title(swear)
|
||||
}
|
||||
|
||||
func HandleRequest() (events.APIGatewayProxyResponse, error) {
|
||||
return events.APIGatewayProxyResponse{
|
||||
StatusCode: http.StatusOK,
|
||||
Body: fmt.Sprintf(genSwear()),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
lambda.Start(HandleRequest)
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
anus
|
||||
ass
|
||||
badger
|
||||
bag
|
||||
ball
|
||||
bitch
|
||||
breath
|
||||
bubble
|
||||
bucket
|
||||
burger
|
||||
butter
|
||||
canoe
|
||||
cheese
|
||||
clown
|
||||
cluster
|
||||
cock
|
||||
cum
|
||||
dick
|
||||
douche
|
||||
dumpster
|
||||
face
|
||||
fanny
|
||||
flap
|
||||
fuck
|
||||
goblin
|
||||
head
|
||||
hole
|
||||
house
|
||||
jizz
|
||||
jockey
|
||||
knob
|
||||
magnet
|
||||
muffin
|
||||
nose
|
||||
nugget
|
||||
nut
|
||||
pancake
|
||||
piss
|
||||
pouch
|
||||
puddle
|
||||
rectum
|
||||
sack
|
||||
sandwich
|
||||
scrote
|
||||
scrotum
|
||||
shit
|
||||
stain
|
||||
stick
|
||||
tampon
|
||||
thunder
|
||||
tit
|
||||
trumpet
|
||||
twat
|
||||
waffle
|
||||
wank
|
||||
weasel
|
||||
weed
|
||||
wipe
|
||||
soggy
|
Loading…
Reference in New Issue