Compare commits

...

3 Commits

9 changed files with 23 additions and 15 deletions

View File

@@ -1,14 +1,14 @@
// boolean.go // boolean.go
package bocchi package bocchi
import "git.sunturtle.xyz/zephyr/errors-my-beloved/boolean/secret" import "git.sunturtle.xyz/zephyr/errors-my-beloved/boolean/challenge"
var _ = map[bool]struct{}{ var _ = map[bool]struct{}{
false: {}, false: {},
secret.Secret == "gc25{}": {}, // ERROR: ./boolean.go:7:2: duplicate key false in map literal challenge.Flag == "gc25{}": {}, // ERROR: ./boolean.go:7:2: duplicate key false in map literal
} }
var _ = map[bool]struct{}{ var _ = map[bool]struct{}{
false: {}, false: {},
secret.Secret[:5] != "gc25{": {}, // silently succeeds, even though it evaluates to false challenge.Flag[13:] != "CRDy}": {}, // silently succeeds, even though it evaluates to false
} }

View File

@@ -0,0 +1,3 @@
package challenge
const Flag = "gc25{afR7yRQVCRDy}"

View File

@@ -1,3 +0,0 @@
package secret
const Secret = "gc25{afR7yRQVCRDy}"

View File

@@ -0,0 +1,7 @@
//go:build !cgo
package constraint
func _() {
"This package requires cgo to build. An error here means cgo is disabled for your build."
}

3
constraint/constraint.go Normal file
View File

@@ -0,0 +1,3 @@
//go:build cgo
package constraint

3
constraint/go.mod Normal file
View File

@@ -0,0 +1,3 @@
module git.sunturtle.xyz/zephyr/errors-my-beloved/syntax
go 1.25.0

View File

@@ -4,4 +4,4 @@ type Interface interface {
Think(prefix []string) (string, error) Think(prefix []string) (string, error)
} }
func Think(s Interface, prompt string) (string, error) { panic("TODO") } func Think(br Interface, prompt string) (string, error) { panic("TODO") }

View File

@@ -1,6 +0,0 @@
package brain
type (
Message struct{}
Tuple struct{}
)

View File

@@ -7,4 +7,5 @@ use (
./iface ./iface
./sizeofstring ./sizeofstring
./stringer ./stringer
./constraint
) )