Skip to content

Instantly share code, notes, and snippets.

View syossan27's full-sized avatar
💭
🤔

syossan27 syossan27

💭
🤔
View GitHub Profile
func parseNonAscii(latin1Byte []byte) string {
isMarking := false
var byteBuffer []byte
for _, codePoint := range latin1Byte {
// 131は0x83の10進数表現
if codePoint == 131 {
isMarking = true
continue
}
E38182 E38183 A4 E38183 A6 E38183 A8 E38183 AA
ã<81><82>ã<81><83>¤ã<81><83>¦ã<81><83>¨ã<81><83>ª
git commit --allow-empty -m "SideCIã<81><83>¬è<83>°½ã<81><83><81>ã<81><83>¿ã<81><83>¿ã<82><81>å<83>¦<83>­PR"
$ 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"
package main
import (
"log"
"github.com/fsnotify/fsnotify"
)
func main() {
// watcherの作成
package main
import (
"log"
"syscall"
)
func main() {
// kqueueの作成
kq, err := syscall.Kqueue()
// 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),
package main
import (
"log"
"github.com/fsnotify/fsnotify"
)
func main() {
// watcherの作成
func main() {
f, err := os.Open("hoge.txt")
if err != nil {
println("Err")
}
// 1回目
err = file_scan(f)
if err != nil {
println("Err")
}