func ResolveValSetting(s string, cfg *syscfg.Cfg) (ValSetting, error) {
	refName, val, err := cfg.ExpandRef(s)
	if err != nil {
		return ValSetting{},
			util.FmtNewtError("value \"%s\" references undefined setting", s)
	}
	return ValSetting{
		Text:    s,
		RefName: refName,
		Value:   val,
	}, nil
}
Constructs a setting from a YAML string.
package val
import (
	"mynewt.apache.org/newt/newt/syscfg"
	"mynewt.apache.org/newt/util"
)
type ValSetting struct {
	Text string
	RefName string
	Value string
}
func (vs *ValSetting) IntVal() (int, error) {
	iv, err := util.AtoiNoOct(vs.Value)
	if err != nil {
		return 0, util.ChildNewtError(err)
	}
	return iv, nil
}