123456789101112131415161718192021 |
- package main
- // Determines validity of something
- type Valid interface {
- valid() bool
- }
- // Verifies validity of something
- func IsValid(v Valid) bool {
- return v.valid()
- }
- // Verifies invalidity of something
- func IsInvalid(v Valid) bool {
- return !v.valid()
- }
- // Attempt to merge all rendering code into one method (which could then be chained)
- type Render interface {
- render() string
- }
|