Git Product home page Git Product logo

vacancygolangtest's Introduction

Go Lang vacancy test

This is a task for Go programmer vacancy at Geeks.Team

geeks

If any questions about task, join the chat at our Gitter https://gitter.im/geeksteam/Vacancies or mailto vacancy @ geeks.team.

As a test for your begginer Go lang skills we ask you to create a simple web-server.

Using Gin framework https://github.com/gin-gonic/gin create a web server with a handler /checkText. Handler will listen for POST request with such JSON:

{
   "Site":["https://google.com","https://yahoo.com"],
   "SearchText":"Google"
}

Request structure:

type Request struct {
    Site []string // Slice of strings: https://blog.golang.org/go-slices-usage-and-internals
    SearchText string
}

After getting request handler must get the body content of each website mentioned in Site variable (this is list of urls) and search in it for a SearchText. You can use default Go http client to get the websites body content.

  • If the requested SearchText was found on the page of any Site url, webserver must return JSON with the url of the site at which text was found.

Response example:

{
    "FoundAtSite":"https://google.com"
}

Response structure:

type Response struct {
    FoundAtSite string
}
  • If text was not found return HTTP Code 204 No Content.

Your test web-server must be provided at your Github repo. Just send as a link.

If any questions about task, join the chat at our Gitter https://gitter.im/geeksteam/Vacancies or mailto vacancy @ geeks.team.

vacancygolangtest's People

Contributors

geekbrother 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.