Skip to content

Instantly share code, notes, and snippets.

View 01-31-encode-from-shift-jis-to-utf8.go
package main
import (
"fmt"
"golang.org/x/text/encoding/japanese"
"golang.org/x/text/transform"
"io"
"log"
"os"
)
View 01-26-http-request-eg.go
package main
import (
"net/http"
"os"
"log"
)
/**
http.Request はクライアントサーバ両方使える
View 01-12-simple-chaining-context.go
package main
import (
"context"
"time"
"sync"
"fmt"
)
func main() {
View 01-12-chaining-context.go
package main
import (
"context"
"sync"
"fmt"
"time"
)
func main() {
View 01-11-waitgroup-eg.go
package main
import (
"sync"
"time"
"fmt"
)
/**
WaitGroup 使
View 01-11-context-deadline-sample.go
package main
import (
"context"
"time"
"fmt"
"sync"
)
// try context.Deadline
View 01-11-channel-owner-consumer.go
package main
import (
"fmt"
)
/**
Channel では、channel の所有者と利用者(消費者)の役割分担をキチンとしておく。
*/
func main() {
View 01-11-chan-http-sample.go
package main
import (
"net/http"
"fmt"
"time"
)
func main() {
type Result struct {
View 01-07-http-fixed-go-routine-using-queue.go
package main
import (
"log"
"sync"
"time"
)
const (
MaxGoRoutine = 3
View 01-07-http-context-timeout.go
package main
import (
"fmt"
"net/http"
"os"
"io"
"context"
"time"
)