GithubHelp home page GithubHelp logo

countries-cli's Introduction

countries-cli

How to use the CLI:

countries -h will display the help menu

GLOBAL OPTIONS:
   --population, -p  Display the country's population only
   --language, -l    Display the country's language only
   --help, -h        show help
   --version, -v     print the version

countries <country> displays information about

  • Capital
  • (Sub)region
  • Population
  • Currency
  • Language

countries-cli's People

Contributors

dabcoder avatar

Watchers

 avatar  avatar

countries-cli's Issues

First code review and some feedback

After walking through the current master code, you will find my feedback below as TODO entries:

  • it will be better to declarebaseURL const outside main() function, usually after the imports

  • You could use fmt.Sprintf() function to avoid string concatenation using + or even strings.Builder introduced in Go 1.10 version.

  • Need to close the body after http.Response creation
    After opening the connection using http.Get(), you forgot to close the resp.Body after the line 42, you can do it with the following statement: Read more on defer

defer resp.Body.Close()

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.