Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More readme updates

  • Loading branch information...
commit 8426088443b9cb2521b965d3bcd2b54b3aa372a7 1 parent 1bc7564
@mikelikespie authored
Showing with 25 additions and 20 deletions.
  1. +25 −20 README.md
View
45 README.md
@@ -1,28 +1,33 @@
ConfigParser for Go
===================
-Implementation of a parser of Python's[ConfigParser] format for Go
+Implementation of a parser of Python's [ConfigParser] file format for Go.
+
+The format is similar to win INI's, but key/value pairs can be separated by
+either `'` or `:`.
+
+Whitespace is trimmed, but newlines are preserved.
[ConfigParser]: http://docs.python.org/library/configparser.html
Example usage:
- package main
-
- import (
- "fmt"
- "github.com/mikelikespie/configparser-go/configparser"
- )
-
- func main() {
- // configparser.Parse and configparser.ParseFile also work
- config, _ := configparser.ParseString(`[Hello]
- foo = bar
- boo : baz`)
-
- foo := config["Hello"]["foo"]
-
- fmt.Println(foo)
- }
-
-
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/mikelikespie/configparser-go/configparser"
+)
+
+func main() {
+ // configparser.Parse and configparser.ParseFile also work
+ config, _ := configparser.ParseString(`[Hello]
+foo = bar
+boo : baz`)
+
+ foo := config["Hello"]["foo"]
+
+ fmt.Println(foo)
+}
+```
Please sign in to comment.
Something went wrong with that request. Please try again.