// SectionSetInt stores the section/key/value triple to this INI,
// creating it if it wasn't already present.
184020
func (ini *INI) SectionSetInt(section, key string, value int) {
    ini.SectionSet(section, key, strconv.Itoa(value))
}
1018977
func (ini *INI) Delete(section, key string) {
    kvmap, ok := ini.GetKvmap(section)
    if ok {
        delete(kvmap, key)
    }
}
876297
func (ini *INI) SectionGet(section, key string) (value string, ok bool) {
    if s := ini.sections[section]; s != nil {
        value, ok = s[key]
    }
    return
}
1195510
func (prefs Preferences) SetValue(key string, value string) (Preferences, error) {
	parts := strings.Split(key, ".")
	section := parts[0] // [Core|Default]
	key = parts[1]      // Rest of the property name

	// Identify category struct by ini tag name [Core|Default]
	values := reflect.ValueOf(&prefs).Elem()
	target := findElemByName(values, section)

	// Identify field to update by ini tag name
	values = reflect.ValueOf(&prefs).Elem().FieldByName(target)
	if values == reflect.Zero(reflect.TypeOf(values)).Interface() {
		return prefs, errs.NewExitError("error: unknown section `" + section + "`")
	}
	property := findElemByName(values, key)

	// Ensure the field is not zero
	field := values.Addr().Elem().FieldByName(property)
	if field == reflect.Zero(reflect.TypeOf(field)).Interface() {
		return prefs, errs.NewExitError("error: unknown property `" + key + "`")
	}

	switch field.Type() {
	case reflect.TypeOf(true):
		v := true
		if value != "true" && value != "1" {
			v = false
		}
		field.SetBool(v)
	default:
		field.SetString(value)
	}

	return prefs, nil
}
1247976
func (ini *INI) Keys(section string) []string {
	s := ini.getSection(section)
	if s == nil {
		return nil
	}

	keys := make([]string, len(s.Data))
	for i, items := range s.Data {
		var key string
		if items != nil {
			key = items.Key
		}
		keys[i] = key
	}
	return keys
}
92949
func (s *Section) ChildSections() []*Section {
	prefix := s.name + "."
	children := make([]*Section, 0, 3)
	for _, name := range s.f.sectionList {
		if strings.HasPrefix(name, prefix) {
			children = append(children, s.f.sections[name])
		}
	}
	return children
}
89557
func (p *pageState) initOutputFormat(isRenderingSite bool, idx int) error {
	if err := p.shiftToOutputFormat(isRenderingSite, idx); err != nil {
		return err
	}

	if !p.renderable {
		if _, err := p.Content(); err != nil {
			return err
		}
	}

	return nil

}
1153009
func (t Term) SetIntersection(args ...interface{}) Term {
	return constructMethodTerm(t, "SetIntersection", p.Term_SET_INTERSECTION, args, map[string]interface{}{})
}
1017907
func (s *StackSetOperationPreferences) SetRegionOrder(v []*string) *StackSetOperationPreferences {
	s.RegionOrder = v
	return s
}
573960
func (s *Section) SetKey(key, value string) {
	s.SetKeyValueRaw(s.file.KeyManipFunc(key), s.file.ValueManipFunc(value))
}
814906
func (ini *INI) SectionGetInt(section, key string) (int, bool) {
    v, ok := ini.SectionGet(section, key)
    if ok {
        v, err := strconv.Atoi(v)
        if err == nil {
            return v, true
        }
    }

    return 0, ok
}
195783
func (c *IniConfigContainer) GetSection(section string) (map[string]string, error) {
	if v, ok := c.data[section]; ok {
		return v, nil
	}
	return nil, errors.New("not exist setction")
}
925474
func (ini *INI) SetInt(key string, value int) {
    ini.SectionSetInt(DefaultSection, key, value)
}
1186348
func (ini *INI) SectionGetBool(section, key string) (bool, bool) {
    v, ok := ini.SectionGet(section, key)
    if ok {
        switch v {
        case "1", "t", "T", "true", "TRUE", "True", "on", "ON", "On", "yes", "YES", "Yes":
            return true, true
        case "0", "f", "F", "false", "FALSE", "False", "off", "OFF", "Off", "no", "NO", "No":
            return false, true
        }
    }

    return false, false
}
656998
func (t Section) Int(k string) int64 {
	return t.values[k].IntValue()
}
660457
func (c Client) WithInspection() PrepareDecorator {
	if c.RequestInspector == nil {
		return WithNothing()
	}
	return c.RequestInspector
}
393141
func (c *ConfigFile) SetValue(section, key, value string) bool {
	// Blank section name represents DEFAULT section.
	if len(section) == 0 {
		section = DEFAULT_SECTION
	}
	if len(key) == 0 {
		return false
	}

	if c.BlockMode {
		c.lock.Lock()
		defer c.lock.Unlock()
	}

	// Check if section exists.
	if _, ok := c.data[section]; !ok {
		// Execute add operation.
		c.data[section] = make(map[string]string)
		// Append section to list.
		c.sectionList = append(c.sectionList, section)
	}

	// Check if key exists.
	_, ok := c.data[section][key]
	c.data[section][key] = value
	if !ok {
		// If not exists, append to key list.
		c.keyList[section] = append(c.keyList[section], key)
	}
	return !ok
}