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 ( | |
"fmt" | |
) | |
func init() { | |
fmt.Println("hello, init") | |
} |
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 LoadConfig(c context.Context) (*ChannelConfig, error) { | |
return &ChannelConfig{ | |
Secret: "内緒", | |
Token: "トークン", | |
}, nil | |
} |
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 ( | |
"os" | |
"github.com/nsf/termbox-go" | |
"stepX/engine" | |
"stepX/game" | |
"sync" |
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
$ CGO_ENABLED=1 \ | |
CC=arm-linux-androideabi-gcc \ | |
GOOS=android \ | |
GOARCH=arm \ | |
GOARM=7 \ | |
go build -buildmode=c-shared -o libhoge.so hoge.go |
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
// +build android | |
package main | |
/* | |
#cgo LDFLAGS: -landroid | |
#include <jni.h> | |
#include <stdlib.h> | |
JavaVM* current_vm; | |
jobject current_ctx; |
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 ( | |
"image" | |
"image/color" | |
"image/draw" | |
"image/png" | |
"net/http" | |
"regexp" | |
"strconv" |
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 ( | |
"fmt" | |
"os" | |
"path/filepath" | |
) | |
func main() { | |
filepath.Walk(os.Args[1], |
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
$ CGO_ENABLED=1\ | |
CC=arm-linux-androideabi-gcc\ | |
GOOS=android\ | |
GOARCH=arm\ | |
GOARM=7\ | |
go buid -build-mode=pie hellocgo.go |
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 ( | |
"fmt" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/hello", hello) | |
http.ListenAndServe(":8080", nil) |
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 ( | |
"errors" | |
"runtime" | |
"unsafe" | |
"golang.org/x/mobile/app" | |
"golang.org/x/mobile/event/lifecycle" | |
"golang.org/x/mobile/event/paint" |