9 Pushing to GitHub

Before we do this it is a good idea to use go vet.

9.1 Use go vet

The go vet command will double check your code for common errors.

This tool won’t keep you from making huge errors in logic, or from creating buggy code. But it does catch some common errors quite nicely. It’s a great idea to get in the habit of running go vet your code base before you commit it to a source repository.

9.2 Make a new repository on GitHub

Make use of the guide - Make a new repository on GitHub, to set up your repository (repo). I named it redditnews.

In your local redditnews folder, create two files README.md and LICENSE.txt as follows:

Program README.md


An Internal Project: redditnews
-------------------------------

[![baby-gopher](images/babygopher-badge.png)](http://www.babygopher.org)

These projects specifications were given to a "Baby Gopher".

> "I am keen to be abreast with what's happening in the **Golang** world. To that end,
> we will write a command-line program (**`redditnews.go`**) that fetches and displays
> the latest headlines from the golang page on Reddit.
>
> The program will:
>
> * make an HTTP request to the Reddit API.
> * decode the JSON response into a Go data structure, and
> * display each link's author, score, URL and title.
>
> We will then be building a _bare-bones_ News Reader package (**`redditnews`**) that 
> gives us the latest news and headlines from the Golang Sub-Reddit, using Reddit's 
> API. 
>

The "Baby Gopher" built this package and documented his progress so that other 
"Baby Gophers" could find it easy to understand the _mechanics_ of writing a package
in Go. He/she would now be able to build their own Go packages.

You can download this file here.

Program LICENSE.txt


The MIT License (MIT)

Copyright (c) [2014] [Satish Talim]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

You can download this file here.

Then open a Bash shell for your local folder redditnews and type:

$ git init
$ git add .
$ git commit -m "first commit"
$ git remote add origin https://github.com/SatishTalim/redditnews.git
$ git push -u origin master