This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func parseNonAscii(latin1Byte []byte) string { | |
| isMarking := false | |
| var byteBuffer []byte | |
| for _, codePoint := range latin1Byte { | |
| // 131は0x83の10進数表現 | |
| if codePoint == 131 { | |
| isMarking = true | |
| continue | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| E38182 E38183 A4 E38183 A6 E38183 A8 E38183 AA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ã<81><82>ã<81><83>¤ã<81><83>¦ã<81><83>¨ã<81><83>ª |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git commit --allow-empty -m "SideCIã<81><83>¬è<83>°½ã<81><83><81>ã<81><83>¿ã<81><83>¿ã<82><81>å<83>¦<83>PR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ go run main.go | |
| vim pre-commit.sample | |
| cp pre-commit.sample pre-commit | |
| vim .git/hooks/pre-commit | |
| vim pre-commit | |
| git commit --allow-empty -m "SideCIぃ�胰�ぃ�ぃ�ぃ�め僦��PR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "github.com/fsnotify/fsnotify" | |
| ) | |
| func main() { | |
| // watcherの作成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "syscall" | |
| ) | |
| func main() { | |
| // kqueueの作成 | |
| kq, err := syscall.Kqueue() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. | |
| func NewWatcher() (*Watcher, error) { | |
| kq, err := kqueue() | |
| if err != nil { | |
| return nil, err | |
| } | |
| w := &Watcher{ | |
| kq: kq, | |
| watches: make(map[string]int), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "github.com/fsnotify/fsnotify" | |
| ) | |
| func main() { | |
| // watcherの作成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func main() { | |
| f, err := os.Open("hoge.txt") | |
| if err != nil { | |
| println("Err") | |
| } | |
| // 1回目 | |
| err = file_scan(f) | |
| if err != nil { | |
| println("Err") | |
| } |