Skip to content

Instantly share code, notes, and snippets.

James Harris jmalloc

  • Brisbane, Australia
Block or report user

Report or block jmalloc

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
@jmalloc
jmalloc / panicwith.go
Created Jan 12, 2018
Gomega Panic matcher.
View panicwith.go
package main
func PanicWith(m types.GomegaMatcher) types.GomegaMatcher {
return &PanicWithMatcher{Matcher: m}
}
type PanicWithMatcher struct {
Matcher types.GomegaMatcher
panicked bool
matched bool
@jmalloc
jmalloc / ulock.go
Last active Feb 19, 2017
Possible "upgradable lock" implementation for Go - 100% untested.
View ulock.go
package syncutil
import "sync"
type UMutex struct {
guard sync.RWMutex
actual sync.RWMutex
}
type ULock struct {
You can’t perform that action at this time.