bump(github.com/ccding/go-config-reader): 8b6c2b50197f20da3b1c5944c274c173634dc056
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
// author: Cong Ding <dinggnu@gmail.com>
|
||||
//
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
@ -22,9 +22,11 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
res, err := config.Read("example.conf")
|
||||
c := config.NewConfig("example.conf")
|
||||
err := c.Read()
|
||||
fmt.Println(err)
|
||||
fmt.Println(res)
|
||||
fmt.Println(res["test.a"])
|
||||
fmt.Println(res["dd"])
|
||||
fmt.Println(c)
|
||||
fmt.Println(c.Get("test", "a"))
|
||||
fmt.Println(c.Get("", "dd"))
|
||||
c.WriteTo("example2.conf")
|
||||
}
|
||||
|
Reference in New Issue
Block a user