Skip to content

Commit

Permalink
document: update
Browse files Browse the repository at this point in the history
  • Loading branch information
kyokomi committed Aug 23, 2014
1 parent 5a72ca7 commit 3a1ab66
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
# appConfig

[![Build Status](https://drone.io/github.com/kyokomi/appConfig/status.png)](https://drone.io/github.com/kyokomi/appConfig/latest)
[![Coverage Status](https://img.shields.io/coveralls/kyokomi/appConfig.svg)](https://coveralls.io/r/kyokomi/appConfig?branch=master)

=========

homedir read write to app config file for golang ( Go )

## Usage
## Example

[source](https://github.com/kyokomi/appConfig/blob/master/example/main.go)

```go
package main

import (
"github.com/kyokomi/appConfig"
"bytes"
"log"
"fmt"
)

func main() {

accessToken := "aaaaaaaaaaaaaaaaaaaaa"

c := appConfig.NewAppConfig("goSampleApp")
err := c.WriteAppConfig(bytes.NewBufferString(accessToken).Bytes())
if err != nil {
log.Fatal(err)
}

data, err := c.ReadAppConfig()
if err != nil {
log.Fatal(err)
}

fmt.Println(string(data))
}
```

## Install

Expand Down

0 comments on commit 3a1ab66

Please sign in to comment.