Giter Club home page Giter Club logo

go_translator_gopher's Introduction

English <-> Gopher - Go Service translator 📃

~

License

Overview

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.

Setup and run locally

go mod vendor
go run main.go -port=<input_port>
# go run main.go

type the port which the application should use

Docker

Go to branch "docker_app" 
https://github.com/richardsplit/go_translator_gopher/tree/docker_app

Run tests

Prerequisites

go generate ./...
ginkgo -v

Sample calls locally

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

Sample call through POSTMAN

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." }

go_translator_gopher's People

Contributors

richardsplit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.