sync.go 533 B

1234567891011121314151617181920212223
  1. package packages
  2. import (
  3. "reflect"
  4. "sync"
  5. "github.com/mattn/anko/env"
  6. )
  7. func init() {
  8. env.Packages["sync"] = map[string]reflect.Value{
  9. "NewCond": reflect.ValueOf(sync.NewCond),
  10. }
  11. env.PackageTypes["sync"] = map[string]reflect.Type{
  12. "Cond": reflect.TypeOf(sync.Cond{}),
  13. "Mutex": reflect.TypeOf(sync.Mutex{}),
  14. "Once": reflect.TypeOf(sync.Once{}),
  15. "Pool": reflect.TypeOf(sync.Pool{}),
  16. "RWMutex": reflect.TypeOf(sync.RWMutex{}),
  17. "WaitGroup": reflect.TypeOf(sync.WaitGroup{}),
  18. }
  19. syncGo19()
  20. }