mirror of
https://github.com/jimeh/go-render.git
synced 2026-02-19 11:26:39 +00:00
docs(readme): minor fix and tweaks
This commit is contained in:
14
README.md
14
README.md
@@ -34,7 +34,7 @@ formats.
|
|||||||
|
|
||||||
## Import
|
## Import
|
||||||
|
|
||||||
```
|
```go
|
||||||
import "github.com/jimeh/go-render"
|
import "github.com/jimeh/go-render"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -62,15 +62,15 @@ The above assumes the following `Version` struct:
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
type Version struct {
|
type Version struct {
|
||||||
Version string `json:"version" yaml:"version" xml:",chardata"`
|
Version string `json:"version" yaml:"version" xml:",chardata"`
|
||||||
Latest bool `json:"latest" yaml:"latest" xml:"latest,attr"`
|
Latest bool `json:"latest" yaml:"latest" xml:"latest,attr"`
|
||||||
Stable bool `json:"stable" yaml:"stable" xml:"stable,attr"`
|
Stable bool `json:"stable" yaml:"stable" xml:"stable,attr"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Version) String() string {
|
func (v *Version) String() string {
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
"%s (stable: %t, latest: %t)", v.Version, v.Stable, v.Latest,
|
"%s (stable: %t, latest: %t)", v.Version, v.Stable, v.Latest,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user