getgithub

command module
v0.0.0-...-e8b1655 Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: GPL-3.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

getgithub

Get specific file or directory from the a github repo without cloning.

How to Install/Get

$ go get github.com/praveenkumar/getgithub
$ export PATH=$PATH:$GOPATH/bin
$ getgithub -h
 Usage of ./getgithub:
   -branch string
     	branch or tag (default "master")
   -dest string
     	Destination directory (default "/Users/prkumar/work/github/go_practice/src/github.com/praveenkumar/getgithub/out")
   -dir string
     	Directory or file to download (default "/")
   -list
     	List the directory/file for provided Path
   -owner string
     	Name of the repo owner
   -repo string
     	Name of the repo

How to Use

Get the list of file and directories from the top of repository.

 $ ./getgithub -repo minishift -owner minishift -list
file 	 .gitignore 
file 	 Gopkg.lock 
file 	 Gopkg.toml 
file 	 LICENSE 
file 	 Makefile 
dir 	 cmd 
dir 	 test 
dir 	 .circleci 
file 	 .travis.yml 
file 	 README.adoc 
file 	 ROADMAP.adoc 
file 	 centos_ci.sh 
dir 	 addons 
dir 	 scripts 
dir 	 .github 
file 	 .gitlab-ci.yml 
file 	 CONTRIBUTING.adoc 
file 	 appveyor.yml 
dir 	 docs 
file 	 gen_help_text.go 
dir 	 pkg 

Get the list of files and directories from specified directory.

$ ./getgithub -repo minishift -owner minishift -dir /pkg -list
dir 	 pkg/version 
dir 	 pkg/minikube 
dir 	 pkg/minishift 
dir 	 pkg/testing 
dir 	 pkg/util

Get the content of the file and directories from specified directory keeping directory tree intact.

$ ./getgithub -repo minishift -owner minishift -dir /pkg/minishift -dest /tmp/
$ ls /tmp/pkg/minishift/
addon		cluster		config		docker		network		openshift	provisioner	shell		update
cache		clusterup	constants	hostfolder	oc		profile		registration	systemd		util

How to build

$ make build

Note

If you get rate limit error then set GH_TOKEN to environment variable.

$ export GH_TOKEN=<my_token>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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