func (s *SwitchPortEntity) parseTrunkNativeVlan(config string) string {
	re := regexp.MustCompile(`(?m)switchport trunk native vlan (\d+)`)
	match := re.FindStringSubmatch(config)
	if match == nil {
		return ""
	}
	return match[1]
}
parseTrunkNativeVlan Scans the specified config and parse the trunk native
vlan value

Args:
config (string): The interface configuration block to scan

Returns:
A string value of switchport trunk native vlan value.
package module
import (
	"regexp"
	"strings"
	"github.com/aristanetworks/goeapi"
)
type SwitchPortConfig map[string]string
type SwitchPortConfigMap map[string]SwitchPortConfig
type SwitchPortEntity struct {
	*AbstractBaseEntity
}
func (s SwitchPortConfig) Name() string {
	return s["name"]
}
func (s SwitchPortConfig) Mode() string {
	return s["mode"]
}
func (s SwitchPortConfig) AccessVlan() string {
	return s["access_vlan"]
}
func (s SwitchPortConfig) TrunkNativeVlan() string {
	return s["trunk_native_vlan"]
}
func (s SwitchPortConfig) TrunkAllowedVlans() string {
	return s["trunk_allowed_vlans"]
}
func (s SwitchPortConfig) TrunkGroups() string {
	return s["trunk_groups"]
}
func SwitchPort(node *goeapi.Node) *SwitchPortEntity {
	return &SwitchPortEntity{&AbstractBaseEntity{node}}
}
func (s *SwitchPortEntity) Get(name string) SwitchPortConfig {
	parent := "interface " + name
	config, err := s.GetBlock(parent)
	if err != nil {
		return nil
	}
	if matched, _ := regexp.MatchString(`no switchport\s*\n`, config); matched {
		return nil
	}
	return SwitchPortConfig{
		"name":                name,
		"mode":                s.parseMode(config),
		"access_vlan":         s.parseAccessVlan(config),
		"trunk_native_vlan":   s.parseTrunkNativeVlan(config),
		"trunk_allowed_vlans": s.parseTrunkAllowedVlans(config),
		"trunk_groups":        s.parseTrunkGroups(config),
	}
}
func (s *SwitchPortEntity) GetAll() SwitchPortConfigMap {
	config := s.Config()
	re := regexp.MustCompile(`(?m)^interface\s([Et|Po].+)$`)
	matches := re.FindAllStringSubmatch(config, -1)
	response := make(SwitchPortConfigMap)
	for _, line := range matches {
		name := line[1]
		intf := s.Get(name)
		if intf != nil {
			response[name] = intf
		}
	}
	return response
}
func (s *SwitchPortEntity) GetSection(name string) string {
	parent := "interface " + name
	config, err := s.GetBlock(parent)
	if err != nil {
		return ""
	}
	return config
}
func (s *SwitchPortEntity) parseMode(config string) string {
	re := regexp.MustCompile(`(?m)switchport mode (\w+)`)
	match := re.FindStringSubmatch(config)
	if match == nil {
		return ""
	}
	return match[1]
}
func (s *SwitchPortEntity) parseTrunkGroups(config string) string {
	trunkGroups := []string{}
	re := regexp.MustCompile(`(?m)switchport trunk group ([^\s]+)`)
	matches := re.FindAllStringSubmatch(config, -1)
	if matches == nil {
		return ""
	}
	for _, match := range matches {
		for idx, name := range match {
			if idx == 0 || name == "" {
				continue
			}
			trunkGroups = append(trunkGroups, name)
		}
	}
	return strings.Join(trunkGroups, ",")
}
func (s *SwitchPortEntity) parseAccessVlan(config string) string {
	re := regexp.MustCompile(`(?m)switchport access vlan (\d+)`)
	match := re.FindStringSubmatch(config)
	if match == nil {
		return ""
	}
	return match[1]
}