log.Logger & io.MultiWriter example
Overview How to use log.Logger with io.MultiWriter. In case of writting STDOUT and File Example p...
50 search resultsShowing 1~20 results
You need to log-in
Overview How to use log.Logger with io.MultiWriter. In case of writting STDOUT and File Example p...
Overview Snippet for ssh public key authentication Command $ cd ~/ $ mkdir .ssh $ chmod 700 .ssh ...
Overview to know magic variables - hosts: all gather_facts: no tasks: - name: show Magic | group_...
Overview 備忘録 Setup yaml docker.yamlをもとにyaml作成 この辺を適宜変更 mounts: - location: "~" - location: "/tmp/...
overview docker desktopを利用しないでdockerを利用する設定 installation docker engine docker compose v2 $ DOCKER...
while install old version python by pyenv CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --p...
Overview Fake Time for test. not best way. Detail var now = Time.Now // if you want to use specif...
use socketfilterfw man
cpu, trace, memory, block and goroutine cw, err := os.Getwd() if err != nil { panic(err) } f, err...
Overview docker上にテスト用のredis sentinelを動かして、ホスト上で動いているプログラムから接続する Problem sentinel get-master-addr-...
Overview ライブラリのコードを読んでいたところ、 var _ Setter = (*Cmd)(nil) こんなコードがあったので、effective goをもとに、なんの意味があるのか確...
Overview Timeoutのエラーかどうか判別する等で使える。 ex) _, ok := err.(interface{ Timeout() bool }) if ok { // ex) ...
Overview ログレベル毎にファイル出力する要件がまだある。 かつ、構造化ログを扱う。 zapが柔軟に設定できそうだった。 Detail 設定方法 出力ファイルの作成 zap core.En...
Overview リトライとbackoffの習作 sample package main import ( "fmt" "math" "math/rand" "time" ) func main...
Overview 作り方確認 sample とりあえずコード package stubs import ( "context" "database/sql" "database/sql/driv...
overview バックグラウンド等で動かすgoroutineを使ったforループプログラムで、シグナルを受け取った際に終了させる処理例 example1 ここではシグナルの代わりに適当なチャン...
work package main import ( "fmt" ) type Test interface{ Run() // Debug() } type My struct{ body s...
Kafka 0.9未満 zookeeperにて管理 /consumers/[Consumerグループ]/offsets/[トピック]/[BrokerId]-[パーティション番号] Kafka 0...
submodue update git submodule update untracked file list git ls-files --others --exclude-standard
やりかた fork 親プロセスは終了 setsid で端末を切り離す カレントディレクトリを / にする。 stdin, stdout, stderrをクローズ 簡易版 void daemoni...
50 search resultsShowing 1~20 results
Qiita is a knowledge sharing service for engineers.