Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Go - CLI Tools Design

Go - CLI Tools Design

Shintaro Kaneko

November 03, 2018

More Decks by Shintaro Kaneko

Other Decks in Programming



    ུྺ ೥ɿ౦ژཧՊେֶཧֶ෦ଔۀ ೥ɿ૊ࠐܥاۀ΁ೖࣾ ೥ɿגࣜձࣾΤ΢ϨΧ΁ೖࣾ ೥ɿಉࣾࣥߦ໾һ$50ब೚ ೥ɿಉࣾऔక໾$50ब೚ ಛٕ ৬छɿΤϯδχΞϦϯά ɺϚωδϝϯτɺ඼࣭อূ ٕज़ɿ$ɺ(Pɺ1)1ɺ($1ɺ"84 ਺ֶɿ࠷దԽཧ࿦ɺઢܗʗඇઢܗܭը๏
  2. Premature optimization is the root of all evil. We should

    forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%. - Donald Knuth
  3. UNIX Philosophy - Doug McIlroy This is the Unix philosophy:

    1. Write programs that do one thing and do it well. 2. Write programs to work together. 3. Write programs to handle text streams, because that is a universal interface. !8
  4. UNIX Philosophy - Mike Gancarz 1. Small is beautiful. 2.

    Make each program do one thing well. 3. Build a prototype as soon as possible. 4. Choose portability over efficiency. 5. Store data in flat text files. 6. Use software leverage to your advantage. 7. Use shell scripts to increase leverage and portability. 8. Avoid captive user interfaces. 9. Make every program a filter. !9
  5. Command Line Interface !11 $ exe [GLOBAL OPTIONS]... \ [<COMMAND>]

    [COMMAND OPTIONS]... [<ARGUMENTS>...] $ git --git-dir=/path/to/repo/.git \ log --oneline -p origin/master • https://github.com/eure/kamimai