Skip to content

Commit 36a5082

Browse files
committed
Mention go module support in documentation
1 parent f7df96f commit 36a5082

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

README.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,55 @@
33
[![GoDoc](https://godoc.org/github.com/stoewer/go-strcase?status.svg)](https://godoc.org/github.com/stoewer/go-strcase)
44
---
55

6-
# Go strcase
6+
Go strcase
7+
==========
78

89
The package `strcase` converts between different kinds of naming formats such as camel case
910
(`CamelCase`), snake case (`snake_case`) or kebab case (`kebab-case`).
1011
The package is designed to work only with strings consisting of standard ASCII letters.
1112
Unicode is currently not supported.
1213

13-
## Versioning and stability
14+
Versioning and stability
15+
------------------------
1416

1517
Although the master branch is supposed to remain always backward compatible, the repository
16-
contains version tags in order to support vendoring tools such as `glide`.
18+
contains version tags in order to support vendoring tools.
1719
The tag names follow semantic versioning conventions and have the following format `v1.0.0`.
20+
This package supports Go modules introduced with version 1.11.
1821

19-
20-
## Install and use
21-
22-
```sh
23-
go get -u github.com/stoewer/go-strcase
24-
```
22+
Example
23+
-------
2524

2625
```go
2726
import "github.com/stoewer/go-strcase"
2827

2928
var snake = strcase.SnakeCase("CamelCase")
3029
```
30+
31+
Dependencies
32+
------------
33+
34+
### Build dependencies
35+
36+
* none
37+
38+
### Test dependencies
39+
40+
* `github.com/stretchr/testify`
41+
42+
Run linters and unit tests
43+
--------------------------
44+
45+
Since some of the linters ran by gometalinter don't support go modules yet, test dependencies have to be
46+
loaded to the vendor directory first and gometalinter itself must run with disabled module support:
47+
48+
```
49+
go mod vendor
50+
GO111MODULE=off gometalinter --config=.gometalinter.json --deadline=10m .
51+
```
52+
53+
To run the test use the following commands:
54+
55+
```
56+
go test .
57+
```

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// All rights reserved.
33

44
// Package strcase converts between different kinds of naming formats such as camel case
5-
// (CamelCase), snake case (snake_case) or kebab case (`kebab-case`). The package is designed
5+
// (CamelCase), snake case (snake_case) or kebab case (kebab-case). The package is designed
66
// to work only with strings consisting of standard ASCII letters. Unicode is currently not
77
// supported.
88
package strcase

0 commit comments

Comments
 (0)