githubutils

package
v0.0.0-...-1791402 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package githubutils provides utility functions to utilize github in the context of retrieving and saving ethpm package manifests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGithubURI

func CreateGithubURI(account string, repo string, commit string) string

CreateGithubURI will construct a valid uri with the given information

func GetCommit

func GetCommit(packagedir string, branch string) (commit string, err error)

GetCommit takes a local repository directory and branch, default is 'master' if an empty string, and return the latest commit hash

func GetETHPMManifest

func GetETHPMManifest(commithttpsurl string, parentdir string) (jsonstring string, err error)

GetETHPMManifest takes a complete github commit uri, and clones it into the given parent directory. If parentdir is an empty string, it will clone into the current working directory, then go into this directory and retrieve the ethpm manifest by looking for an 'ethpm.json' file.

func IsGithubURI

func IsGithubURI(uri string) (bool, error)

IsGithubURI checks to see if the given uri is a valid github uri and returns true if so

Types

This section is empty.

Jump to

Keyboard shortcuts

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