Initial commit: Go 1.23 release state

This commit is contained in:
Vorapol Rinsatitnon
2024-09-21 23:49:08 +10:00
commit 17cd57a668
13231 changed files with 3114330 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
package p1
type O map[string]map[string]string
func (opts O) RemoveOption(sect, opt string) bool {
if _, ok := opts[sect]; !ok {
return false
}
_, ok := opts[sect][opt]
delete(opts[sect], opt)
return ok
}

View File

@@ -0,0 +1,5 @@
package p2
import "./p1"
func NewO() p1.O { return nil }

View File

@@ -0,0 +1,8 @@
package q1
func Deref(typ interface{}) interface{} {
if typ, ok := typ.(*int); ok {
return *typ
}
return typ
}

View File

@@ -0,0 +1,11 @@
package main
import "./q1"
func main() {
x := 1
y := q1.Deref(&x)
if y != 1 {
panic("y != 1")
}
}

View File

@@ -0,0 +1,7 @@
package z
import "./p2"
func main() {
p2.NewO().RemoveOption("hello", "world")
}