Skip to content

Instantly share code, notes, and snippets.

View kaneshin's full-sized avatar
💡

Shintaro Kaneko kaneshin

💡
View GitHub Profile
package foo
import (
"testing"
)
type Foo struct {
ID int
Name string
}
@kaneshin
kaneshin / foo.go
Last active January 15, 2016 12:04
package foo
import (
"bytes"
"encoding/json"
"fmt"
)
func buildArrayBodyVerKojima(v []interface{}) string {
var str string
package main
import (
"fmt"
_ "./hello1"
_ "./hello3"
_ "./hello2"
)
// Generated service client for prmd API.
//
// To be able to interact with this API, you have to
// create a new service:
//
// s := prmd.NewService(nil)
//
// The Service struct has all the methods you need
// to interact with prmd API.
//
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"sync"
)
@kaneshin
kaneshin / main.go
Last active December 31, 2015 16:26
package main
import (
"fmt"
"reflect"
)
const (
Male = iota + 1
Female
package main
import (
"fmt"
"github.com/kaneshin/gopack/exception"
)
// main ...
func main() {
fmt.Println("Hello world")
func qsort(a []int) []int {
if len(a) < 2 { return a }
left, right := 0, len(a) - 1
// Pick a pivot
pivotIndex := rand.Int() % len(a)
// Move the pivot to the right
a[pivotIndex], a[right] = a[right], a[pivotIndex]
package main
import (
"fmt"
"github.com/kaneshin/gopack/exception"
)
// main ...
func main() {
exception.Try(func() {
package main
import (
"log"
"time"
)
// main ...
func main() {
log.Println("Begin: Main")