Skip to content

Instantly share code, notes, and snippets.

Hǎi-Liàng "Hal" Wáng h12w

Block or report user

Report or block h12w

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am h12w on github.
  • I am h12 (https://keybase.io/h12) on keybase.
  • I have a public key ASAk36t8r7J_CMh-pz7tnId5tDHlYJZRwJ7sFREszZRXrAo

To claim this, I am signing this object:

@h12w
h12w / goclean.sh
Last active Jul 21, 2019
golcean.sh does automatic checking on a Go package and its sub-packages.
View goclean.sh
#!/bin/bash
# The script does automatic checking on a Go package and its sub-packages, including:
# 1. gofmt (http://golang.org/cmd/gofmt/)
# 2. goimports (https://github.com/bradfitz/goimports)
# 3. golint (https://github.com/golang/lint)
# 4. go vet (http://golang.org/cmd/vet)
# 5. race detector (http://blog.golang.org/race-detector)
# 6. test coverage (http://blog.golang.org/cover)
set -e
View pipeline_by_chan_quit.go
package main
import (
"fmt"
"runtime"
"time"
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
View pipeline_by_running_chan.go
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func main() {
View pipeline_by_call.go
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func main() {
View pipeline_by_chan.go
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func main() {
You can’t perform that action at this time.