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


  1. CLI Tools Design Shintaro Kaneko - @kaneshin / גࣜձࣾΤ΢ϨΧ !1


    ུྺ ೥ɿ౦ژཧՊେֶཧֶ෦ଔۀ ೥ɿ૊ࠐܥاۀ΁ೖࣾ ೥ɿגࣜձࣾΤ΢ϨΧ΁ೖࣾ ೥ɿಉࣾࣥߦ໾һ$50ब೚ ೥ɿಉࣾऔక໾$50ब೚ ಛٕ ৬छɿΤϯδχΞϦϯά ɺϚωδϝϯτɺ඼࣭อূ ٕज़ɿ$ɺ(Pɺ1)1ɺ($1ɺ"84 ਺ֶɿ࠷దԽཧ࿦ɺઢܗʗඇઢܗܭը๏
  3. !3 (PݴޠΒ͘͠(PίʔυΛ ࣮૷͢ΔͨΊͷख๏ͱࢥ૝ IUUQTLBOFTIJOCPPUIQN

  4. !4 (PݴޠΒ͘͠(PίʔυΛ ࣮૷͢ΔͨΊͷख๏ͱࢥ૝ IUUQTLBOFTIJOCPPUIQN ຊ೔࿩͢͜ͱ͸͜ͷຊʹେମॻ͍ͯ͋Γ·͢

  5. Do you have experience of creating
 Command Line Tools? !5

  6. We absolutely need to know
 The CLI Design for publishing

    a great library !6
  7. 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
  8. 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
  9. 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
  10. Go is based on the philosophy !10

  11. 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
  12. None