Skip to content

Commit

Permalink
update the module version to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed May 14, 2020
1 parent c795b89 commit 1eb924b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# gconf [![Build Status](https://travis-ci.org/xgfone/gconf.svg?branch=master)](https://travis-ci.org/xgfone/gconf) [![GoDoc](https://godoc.org/github.com/xgfone/gconf?status.svg)](http://godoc.org/github.com/xgfone/gconf) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://raw.githubusercontent.com/xgfone/gconf/master/LICENSE)
An extensible and powerful go configuration manager, which is inspired by [oslo.config](https://github.com/openstack/oslo.config), [github.com/micro/go-micro/config](https://github.com/micro/go-micro/tree/master/config) and [viper](https://github.com/spf13/viper).

The current version is `v4` to support **Semantic Import Versioning**, which requires `Go1.11+`. See [DOC](https://godoc.org/github.com/xgfone/gconf).

## Install
```shell
$ go get -u github.com/xgfone/gconf/v4
$ go get -u github.com/xgfone/gconf/v5
```

### V3
Expand Down Expand Up @@ -60,7 +59,7 @@ import (
"flag"
"fmt"

"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v5"
)

func main() {
Expand Down Expand Up @@ -101,7 +100,7 @@ package main
import (
"fmt"

"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v5"
)

var opts = []gconf.Opt{
Expand Down Expand Up @@ -140,7 +139,7 @@ import (
"fmt"
"time"

"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v5"
)

func main() {
Expand Down Expand Up @@ -174,7 +173,7 @@ import (
"fmt"

"github.com/urfave/cli/v2"
"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v5"
)

func main() {
Expand Down Expand Up @@ -235,7 +234,7 @@ import (
"fmt"
"time"

"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v5"
)

var opts = []gconf.Opt{
Expand Down Expand Up @@ -285,7 +284,7 @@ import (
"os"
"time"

"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v5"
)

type Group struct {
Expand Down Expand Up @@ -520,8 +519,8 @@ import (
"fmt"
"time"

"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v4/field"
"github.com/xgfone/gconf/v5"
"github.com/xgfone/gconf/v5/field"
)

// AppConfig is used to configure the application.
Expand Down
2 changes: 1 addition & 1 deletion field/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"sync"
"time"

"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v5"
)

// SafeValue is used to set and get the value safely.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/xgfone/gconf/v4
module github.com/xgfone/gconf/v5

require (
github.com/BurntSushi/toml v0.3.1
Expand Down
4 changes: 2 additions & 2 deletions struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"os"
"time"

"github.com/xgfone/gconf/v4"
"github.com/xgfone/gconf/v4/field"
"github.com/xgfone/gconf/v5"
"github.com/xgfone/gconf/v5/field"
)

func ExampleOptField() {
Expand Down

0 comments on commit 1eb924b

Please sign in to comment.