package asaModels import "regexp" // IPVerifyStatus : Structure for containing information on results of 'sh run ip verify reverse-path' type IPVerifyReversePath struct { EnabledInterfaces []string `json:"enabled_interfaces"` } // NewIPVerifyStatus : Create a new ip verify reverse status object and parse the given string in to it func NewIPVerifyStatus(raw string) *IPVerifyReversePath { i := new(IPVerifyReversePath) i.Parse(raw) return i } // Parse : Parse the raw string in to the structure func (i *IPVerifyReversePath) Parse(raw string) { r := regexp.MustCompile(`ip verify reverse-path interface (\S+)`) for _, m := range r.FindAllStringSubmatch(raw, -1) { i.EnabledInterfaces = append(i.EnabledInterfaces, m[1]) } }