Lines Matching refs:once
23 once := OncePer{}
26 a := once.Once(key, func() interface{} { return "a" }).(string)
27 b := once.Once(key, func() interface{} { return "b" }).(string)
39 once := OncePer{}
44 …go once.Once(key, func() interface{} { close(ch); time.Sleep(100 * time.Millisecond); return "foo"…
46 a := once.Once(key, func() interface{} { return "bar" }).(string)
54 once := OncePer{}
57 a := once.Once(key, func() interface{} { return "a" }).(string)
58 b := once.Get(key).(string)
70 once := OncePer{}
81 once.Get(key)
85 once := OncePer{}
90 …go once.Once(key, func() interface{} { close(ch); time.Sleep(100 * time.Millisecond); return "foo"…
92 a := once.Get(key).(string)
100 once := OncePer{}
103 a := once.OnceStringSlice(key, func() []string { return []string{"a"} })
104 b := once.OnceStringSlice(key, func() []string { return []string{"a"} })
116 once := OncePer{}
119 …a, b := once.Once2StringSlice(key, func() ([]string, []string) { return []string{"a"}, []string{"b…
120 …c, d := once.Once2StringSlice(key, func() ([]string, []string) { return []string{"c"}, []string{"d…
132 once := OncePer{}
136 a := once.Once(key1, func() interface{} { return "a" }).(string)
137 b := once.Once(key2, func() interface{} { return "b" }).(string)
152 once := OncePer{}
156 a := once.Once(key1, func() interface{} { return "a" }).(string)
157 b := once.Once(key2, func() interface{} { return "b" }).(string)
169 once := OncePer{}
173 …a := once.Once(key1, func() interface{} { return once.Once(key2, func() interface{} { return "a" }…
181 once := OncePer{}
193 a = once.Once(key, func() interface{} {
209 b := once.Once(key, func() interface{} {