go-githubusers-cli command - github.com/ajiraj2411/go-githubusers-cli - Go Packages

go-githubusers-cli

command module
v0.0.0-...-1ce5630 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 10 Imported by: 0

README

go-githubusers-cli

Golang CLI app to query GitHub users.

Searching GitHub users using https://api.github.com/users/{username}

It's mainly for learing Implementing CLI

We could use the flag standard library in Go, but, with trial-and-error and a little bit of Googling, you will discover that the standard flag library does not support the long-flag syntax (via double-dash). It only supports single dashes.

So we are going to use already implemented GO library github.com/ogier/pflag

Let's see what and all needed for creating CLI pflag (go get github.com/ogier/pflag) color (go get github.com/fatih/color)

Task Creating Flag user in init Function Call the GetUSer funtion for geeting GitHub users data in a user struct format Parse the details and print the values (UserName, Name, Email, Bio) If have any

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL