Skip to content

Instantly share code, notes, and snippets.

Brad Clawsie bradclawsie

Block or report user

Report or block bradclawsie

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 tcc
package main
// run this: https://play.golang.org/p/lGEbAcNeVJr
import (
"fmt"
"log"
)
const (
View flatten.go
package main
// RUN IT! https://play.golang.org/p/hUrvvq_gBQX
import (
"fmt"
)
func flatten(iface interface{}) []int {
View counter_client.go
package main
import (
"context"
"log"
"os"
"strconv"
"time"
pb "../counter"
View counter_server.go
package main
import (
"context"
"errors"
"log"
"net"
"sync"
pb "../counter"
View counter.proto
syntax = "proto3";
package counter;
// Value contains a countername and its present value.
message Value {
string countername = 1;
int32 value = 2;
}
View channel-pool.go
package main
import (
"errors"
"log"
"math/rand"
"sync"
"time"
)
View keybase.md

Keybase proof

I hereby claim:

  • I am bradclawsie on github.
  • I am b7j0c (https://keybase.io/b7j0c) on keybase.
  • I have a public key whose fingerprint is B1C1 F146 2CE7 6E5F 2D99 4FB3 D817 E42D CCB5 AB08

To claim this, I am signing this object:

@bradclawsie
bradclawsie / correct.go
Last active Jan 26, 2017
curious correct Go program
View correct.go
package main
import (
"fmt"
"time"
)
func main() {
c := make(chan struct{},1)
go func() {
View panic.go
package main
import (
"errors"
"log"
)
func final() {
log.Printf("cleaning up")
if c := recover(); c != nil {
View httpdshutdown_example.go
package main
import (
"log"
"net"
"net/http"
"github.com/bradclawsie/httpdshutdown"
"os"
"os/signal"
"time"
)
You can’t perform that action at this time.