Skip to content

Commit 794935c

Browse files
committed
Merge branch 'master' of https://github.com/mcuadros/go-defaults
2 parents 9f18255 + 5f485d6 commit 794935c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
go-defaults [![Build Status](https://travis-ci.org/mcuadros/go-defaults.png?branch=master)](https://travis-ci.org/mcuadros/go-defaults) [![GoDoc](http://godoc.org/github.com/mcuadros/go-defaults?status.png)](http://godoc.org/github.com/mcuadros/go-defaults) [![GitHub release](https://img.shields.io/github/release/mcuadros/go-defaults.svg)](https://github.com/mcuadros/go-defaults/releases)
22
==============================
33

4-
This library allow to define a default value to any struct, this is made thanks to [struct tags](http://golang.org/pkg/reflect/#StructTag).
5-
6-
> A StructTag is the tag string in a struct field.
7-
8-
> By convention, tag strings are a concatenation of optionally space-separated key:"value" pairs. Each key is a non-empty string consisting of non-control characters other than space (U+0020 ' '), quote (U+0022 '"'), and colon (U+003A ':'). Each value is quoted using U+0022 '"' characters and Go string literal syntax.
9-
4+
Enabling stuctures with defaults values using [struct tags](http://golang.org/pkg/reflect/#StructTag).
105

116
Installation
127
------------
@@ -36,7 +31,7 @@ type ExampleBasic struct {
3631

3732
func NewExampleBasic() *ExampleBasic {
3833
example := new(ExampleBasic)
39-
SetDefaults(example) //<-- This set the defaults values
34+
defaults.SetDefaults(example) //<-- This set the defaults values
4035

4136
return example
4237
}

0 commit comments

Comments
 (0)