Source File
option.go
Belonging Package
text/template
package template
import
type missingKeyAction int
const (
mapInvalid missingKeyAction = iota // Return an invalid reflect.Value.
mapZeroValue // Return the zero value for the map element.
mapError // Error out
)
type option struct {
missingKey missingKeyAction
}
switch [0] {
case "missingkey":
switch [1] {
case "invalid", "default":
.option.missingKey = mapInvalid
return
case "zero":
.option.missingKey = mapZeroValue
return
case "error":
.option.missingKey = mapError
return
}
}
}
panic("unrecognized option: " + )
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |