Skip to content

alediaferia/gocountries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gocountry

This is a Go wrapper library around the API provided by Restcountries.

Installation

Just go with

go get github.com/alediaferia/gocountries

Example Usage

package main

import (
    "fmt"
    "github.com/alediaferia/gocountries"
)

func main() {
    countries, err := gocountries.CountriesByName("italy")

    if err == nil {
        country := (countries)[0]
        fmt.Println(fmt.Sprintf("The capital of Italy is %s", country.Capital))
    }
}

Contribution

Please, feel free to contribute to this project.

The following branches are currently active:

  • master: this is the stable branch which reflects the latest release
  • develop: this is where the magic happens :)

Additionally, I'd suggest you to create a hotfix/ branch when contributing to this repo. Anyway, anything you like is fine, just try to be as descriptive as possible when choosing your branch names so that everything remains as readable as possible.

Thank you for your contributions in advance.

License

This library is provided with a MIT License.

About

A tiny wrapper around Restcountries API by fayder

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages