Skip to content

Instantly share code, notes, and snippets.

View hakamata-rui's full-sized avatar

Rui Hakamata hakamata-rui

  • Tokyo JAPAN
View GitHub Profile
@hakamata-rui
hakamata-rui / goerrors.go
Last active December 1, 2017 03:01
golangでerrorハンドリングする個人的な最適解
package main
import (
"fmt"
"github.com/pkg/errors"
)
var (
ErrHoge = errors.Errorf("error hoge occur")
ErrFuga = errors.Errorf("error fuga occur")
@hakamata-rui
hakamata-rui / parse_json_part.go
Created October 27, 2017 06:07
途中の一部のstructだけ構造体にマッピングしたい場合
package main
import (
"encoding/json"
"fmt"
"reflect"
)
type Field struct {
FieldA int `json:"field_a"`
@hakamata-rui
hakamata-rui / nested_json.go
Created October 26, 2017 15:46
Golangで再帰型のJSONをパースする方法
package main
import (
"encoding/json"
"fmt"
)
type Field struct {
FieldA int `json:"field_a"`
FieldB int `json:"field_b"`

ziho-bot

ziho-botはhubot-slack連携のSNS機能を有したライフログアプリです。

ziho-botの概要イメージ

ziho-botは1時間おきに、その時間に何をしていたか(時報)を投稿するよう促してきます。 投稿した時報は、ziho-bot内にタグ付きで保存され、いつでも過去の時報を確認することができます。 また、ziho-botを使用しているユーザのうち、気になるユーザをフォローする事で、他人の時報をリアルタイムに受け取ることもできます。

ziho-images