func Marshal(v interface{}) (b []byte, err error) {
	rtipe := reflect.TypeOf(v)
	rvalue := reflect.ValueOf(v)
	kind := rtipe.Kind()
	for kind == reflect.Ptr {
		rtipe = rtipe.Elem()
		rvalue = rvalue.Elem()
		kind = rtipe.Kind()
	}
	if kind != reflect.Struct {
		return nil, fmt.Errorf("marshal: expecting struct, got %v", kind)
	}
	in := &Ini{}
	in.marshalStruct(rtipe, rvalue, "", "")
	buf := bytes.NewBuffer(nil)
	err = in.Write(buf)
	if err != nil {
		return nil, err
	}
	b = buf.Bytes()
	return b, nil
}
Marshal encode the struct of v into stream of ini formatted string.

To encode a struct, each exported fields must have tagged with "ini" key;
untagged field will not be exported.

Each exported field in the struct must have at least one tag: a section
where the field's name (the key) and field's value will be saved.
An optional subsection can be defined by adding a string separated by colon
":" after section's name.
An optional key's name also can be defined by adding string after
subsection name.
If key's name is not defined it would be default to lowercase string of
field's name.

An array or slice will be encoded as multiple keys.

One exception to above rule is map type.
A map's key will override the key defined in tag.
package ini
import (
	"bytes"
	"fmt"
	"io"
	"os"
	"reflect"
	"strings"
	"time"
	"github.com/shuLhan/share/lib/debug"
	libstrings "github.com/shuLhan/share/lib/strings"
)
const (
	fieldTagName      = "ini"
	fieldTagSeparator = ":"
)
type Ini struct {
	secs []*Section
}
func Open(filename string) (in *Ini, err error) {
	reader := newReader()
	in, err = reader.parseFile(filename)
	if debug.Value >= 3 && err == nil {
		err = in.Write(os.Stdout)
	}
	return
}
func Parse(text []byte) (in *Ini, err error) {
	reader := newReader()
	return reader.Parse(text)
}