build: separate compiler and libs
This commit is contained in:
18
compiler/cl/_testlibgo/sync/in.go
Normal file
18
compiler/cl/_testlibgo/sync/in.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
var once sync.Once
|
||||
|
||||
func f(s string) {
|
||||
once.Do(func() {
|
||||
println(s)
|
||||
})
|
||||
}
|
||||
|
||||
func main() {
|
||||
f("Do once")
|
||||
f("Do twice")
|
||||
}
|
||||
Reference in New Issue
Block a user