~
This is an HTTP English <-> Gopher - Go Service translator.
Gophers are friendly creatures but it’s not that easy to communicate with them. They have their own language and they don’t understand English. You can use this service to translate to their language.
go mod vendor
go run main.go -port=<input_port>
# go run main.go
type the port which the application should use
Go to branch "docker_app"
https://github.com/richardsplit/go_translator_gopher/tree/docker_app
go generate ./...
ginkgo -v
curl -X POST http://127.0.0.1:8081/word -d '{"english-word": "subliminal"}'
Example output: {"gopher-word":"ubliminalsogo"}
curl -X POST http://127.0.0.1:8081/sentence -d '{"english-sentence": "Ever have that feeling where you are not sure if you are awake or dreaming?"}'
Example output: {"gopher-sentence":"gEver avehogo atthogo eelingfogo herewogo ouyogo gare otnogo uresogo gif ouyogo gare gawake gor reamingdogo?"}
curl http://127.0.0.1:your_port/history
GET/history
http://127.0.0.1:your_port/history
Example Output: { "history": [ { "gopher": "ophergogo" }, { "neo": "eonogo" } ] }
POST/word
http://127.0.0.1:your_port/word
Body raw example:
{"english-word":"neo"}
Example Output: { "gopher-word": "eonogo" }
POST/sentence
http://127.0.0.1:your_port/sentence
Body raw example:
{"english-sentence": "english-sentence":"We're not here because we're free. We're here because we're not free."}
Example Output: { "gopher-sentence": "ereWogo otnogo erehogo ecausebogo erewogo reefogo. ereWogo erehogo ecausebogo erewogo otnogo reefogo." }