mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
16 lines
257 B
Go
16 lines
257 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
type s struct{}
|
|
|
|
func (_ s) String() string {
|
|
password := "horsebatterystaplecorrect"
|
|
return password // $ Source
|
|
}
|
|
|
|
func overrideTest(x s, y fmt.Stringer) {
|
|
fmt.Println(x.String()) // $ Alert
|
|
fmt.Println(y.String()) // OK
|
|
}
|