Skip to content

Commit

Permalink
style: update readme and action scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Oct 13, 2021
1 parent 63ceadf commit 79df2b3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ on:
jobs:

test:
name: Test on go ${{ matrix.go_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: Test on go ${{ matrix.go_version }}
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [1.13, 1.14, 1.15, 1.16]
os: [ubuntu-latest, windows-latest, macOS-latest]
go_version: [1.13, 1.14, 1.15, 1.16, 1.17]

steps:
- name: Check out code
Expand All @@ -32,7 +31,6 @@ jobs:

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
path-to-profile: profile.cov
flag-name: Go-${{ matrix.go_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: true
matrix:
go: [1.15]
go: [1.16]

steps:
- name: Checkout
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ type Options struct {
- `LoadRemote(format, url string) (err error)`
- `LoadSources(format string, src []byte, more ...[]byte) (err error)`
- `LoadStrings(format string, str string, more ...string) (err error)`
- `LoadFilesByFormat(format string, sourceFiles ...string) (err error)`
- `LoadExistsByFormat(format string, sourceFiles ...string) error`

### Getting Values

Expand All @@ -286,6 +288,7 @@ type Options struct {
- `Strings(key string) (arr []string)`
- `StringMap(key string) (mp map[string]string)`
- `Get(key string, findByPath ...bool) (value interface{})`
- `BindStruct(key string, dst interface{}) error`

### Setting Values

Expand All @@ -299,7 +302,6 @@ type Options struct {
- `SetData(data map[string]interface{})` set data to override the Config.Data
- `Exists(key string, findByPath ...bool) bool`
- `DumpTo(out io.Writer, format string) (n int64, err error)`
- `BindStruct(key string, dst interface{}) error`

## Run Tests

Expand Down
4 changes: 3 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ type Options struct {
- `LoadRemote(format, url string) (err error)` 从远程 URL 加载配置数据
- `LoadSources(format string, src []byte, more ...[]byte) (err error)` 从给定格式的字节数据加载配置
- `LoadStrings(format string, str string, more ...string) (err error)` 从给定格式的字符串配置里加载配置数据
- `LoadFilesByFormat(format string, sourceFiles ...string) (err error)` 从给定格式的文件加载配置
- `LoadExistsByFormat(format string, sourceFiles ...string) error` 从给定格式的文件加载配置,会忽略不存在的文件

### 获取值

Expand All @@ -268,6 +270,7 @@ type Options struct {
- `Strings(key string) (arr []string)`
- `StringMap(key string) (mp map[string]string)`
- `Get(key string, findByPath ...bool) (value interface{})`
- `BindStruct(key string, dst interface{}) error`

### 设置值

Expand All @@ -281,7 +284,6 @@ type Options struct {
- `Exists(key string, findByPath ...bool) bool`
- `DumpTo(out io.Writer, format string) (n int64, err error)`
- `SetData(data map[string]interface{})` 设置数据以覆盖 `Config.Data`
- `BindStruct(key string, dst interface{}) error`

## 单元测试

Expand Down

0 comments on commit 79df2b3

Please sign in to comment.