Skip to content

Commit

Permalink
embed original structs in debug structs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbsv committed Oct 3, 2022
1 parent 5d3af81 commit fd6549d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 7 deletions.
8 changes: 7 additions & 1 deletion sync/cond.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package sync

// Cond is only defined for compatibility reasons
import (
_sync "sync"
)

// Cond implements a condition variable, a rendezvous point for goroutines
// waiting for or announcing the occurrence of an event.
type Cond struct {
_sync.Cond
}
9 changes: 6 additions & 3 deletions sync/locker.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package sync

// Locker is only defined for compatibility reasons
import (
_sync "sync"
)

// A Locker represents an object that can be locked and unlocked.
type Locker interface {
Lock()
Unlock()
_sync.Locker
}
9 changes: 8 additions & 1 deletion sync/map.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package sync

// Map is only defined for compatibility reasons
import (
_sync "sync"
)

// Map is like a Go map[interface{}]interface{} but is safe for concurrent use
// by multiple goroutines without additional locking or coordination. Loads,
// stores, and deletes run in amortized constant time.
type Map struct {
_sync.Map
}
8 changes: 7 additions & 1 deletion sync/once.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package sync

// Once is only defined for compatibility reasons
import (
_sync "sync"
)

// Once is an object that will perform exactly one action.
// Once is an object that will perform exactly one action.
type Once struct {
_sync.Once
}
8 changes: 7 additions & 1 deletion sync/pool.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package sync

// Pool is only defined for compatibility reasons
import (
_sync "sync"
)

// A Pool is a set of temporary objects that may be individually saved
// and retrieved.
type Pool struct {
_sync.Pool
}

0 comments on commit fd6549d

Please sign in to comment.