elliotchance/gedcom

View on GitHub
html/living_visibility.go

Summary

Maintainability
A
0 mins
Test Coverage
package html

type LivingVisibility string

const (
    LivingVisibilityShow        = "show"
    LivingVisibilityHide        = "hide"
    LivingVisibilityPlaceholder = "placeholder"
)

func NewLivingVisibility(lv string) LivingVisibility {
    switch LivingVisibility(lv) {
    case LivingVisibilityShow,
        LivingVisibilityHide,
        LivingVisibilityPlaceholder:
        return LivingVisibility(lv)
    }

    panic("invalid LivingVisibility: " + lv)
}