bchadwic / gh-cli Goto Github PK
View Code? Open in Web Editor NEWThis project forked from cli/cli
GitHub’s official command line tool
Home Page: https://cli.github.com
License: MIT License
This project forked from cli/cli
GitHub’s official command line tool
Home Page: https://cli.github.com
License: MIT License
To create line number navigation more efficient and more standard use "main.go:32" instead of a flag --line 32
From "gh browse "main.go" --line 32"
To "gh browse "main.go:32"
function name ideas:
I think we should consider making the exitCode start at the top as successful, then if it reaches any point where the command is unsuccessful, we can change the variable. That way at the end, we just have to check if the exitCode is successful, if so open the browser and print the success message, if not, print the error message and return. This reduces the amount of locations calling exitPrint to two locations in the main run function
Create a list of flags and determine whether or not a correct flag was passed in.
Two considerations for solutions
gh browse --branch "actions-demo"
Make sure we don't prohibit users from reaching a site because we got an false positive on the 404 checker function. This includes limiting the 404 checker to exclusively issues and pr args.
Testing on a forked repo
Missing examples
Missing arg usage
Missing a -R repo directory
To print out errors, use fmt.ErrorfF, return errors.New
Replace Run with RunE
Change print statements to fmt.ErrorF();
Get rid of the checkmarks and x's from the print statements
remove all unnecessary comments
Understand how arguments are passed through the cli
Finished example:
gh browse "main.go" || main.go?
Still considering quotes or not
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.