Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 477 Bytes

File metadata and controls

28 lines (21 loc) · 477 Bytes

unit

reads and builds a map[string]string from a simple unit style resource file

./sample

[sample]
key1 = value1
key2 = value2

[sample2]
# comments are supported as are colon seperators and 
# multi-segemented values are not disturbed on parse
key1 : value1
key2 : value2,value3,value4
key3 : value3:value4:value5
key4 : value4=value5
	var u unit.Unit
	u.Parse("./sample", "sample")    

	// u = map{key1:value1, key2:value2}
	fmt.Println(u)