rhymof / advent Goto Github PK
View Code? Open in Web Editor NEWクリスマスを彩るコマンドです
License: MIT License
クリスマスを彩るコマンドです
License: MIT License
テキストだけだと寂しいので、HTMLを入れてリッチな感じにしたいです
クリスマスと言えば、やはりクリスマスツリーでしょう!
クリスマスツリーのアスキーアートを出力する機能を作成しましょう!
コマンドの機能が増えた場合には、機能を切り替えるための引数、オプションをとる必要があります。
そのための機能を実装してください。
goで何かしらパッケージを作成しそれを使うみたいなものを想像しています。
ブラウザでHi, Merry Christmas ***!🎅🎄✨と表示できるようにする。
『***』の部分は可変になるようにする。
ex)
http://localhost:8080/sample
出力
Hi, Merry Christmas sample!🎅🎄✨
現在、文言や絵文字のみで殺風景なので何かしらもっとおしゃれにして欲しいです。
クリスマス前にURLにアクセスすると、クリスマスまでの日数が出るようにします
nobishino@376a0c1 で追加しているテストを実行するとio.Copy
でpanicします。decorateWriter
でラップしてない場合は何も起きません。
(理由まで調べられていません)
ブラウザリロードするごとにサンタクロースからランダムなメッセージが返ってくみたいにしたいです。
HTTPサーバーとして使うモードと、コマンドで一発叩いて結果表示するモードを分けてもいい気がします
$ advent -serve # サーバーモード
listening on :8080
$ advent my-name # コマンドモード
Hi, Merry Christmas my-name! :santa: :christmas_tree: :sparkles:
現状、Mainパッケージが二つあるので、一つに絞っておきたく思います
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.