Skip to content

Commit

Permalink
doc: add example.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Apr 12, 2021
1 parent 3957c09 commit 5ef7dd5
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,26 @@ Supported string casing:
- `pascal`
- `kebab`
- `snake`
- `goCamel` Respects Go's common initialisms (e.g. HttpResponse -> HTTPResponse).
- `goPascal` Respects Go's common initialisms (e.g. HttpResponse -> HTTPResponse).
- `goKebab` Respects Go's common initialisms (e.g. HttpResponse -> HTTPResponse).
- `goSnake` Respects Go's common initialisms (e.g. HttpResponse -> HTTPResponse).
- `goCamel` Respects [Go's common initialisms](https://github.com/golang/lint/blob/83fdc39ff7b56453e3793356bcff3070b9b96445/lint.go#L770-L809) (e.g. HttpResponse -> HTTPResponse).
- `goPascal` Respects [Go's common initialisms](https://github.com/golang/lint/blob/83fdc39ff7b56453e3793356bcff3070b9b96445/lint.go#L770-L809) (e.g. HttpResponse -> HTTPResponse).
- `goKebab` Respects [Go's common initialisms](https://github.com/golang/lint/blob/83fdc39ff7b56453e3793356bcff3070b9b96445/lint.go#L770-L809) (e.g. HttpResponse -> HTTPResponse).
- `goSnake` Respects [Go's common initialisms](https://github.com/golang/lint/blob/83fdc39ff7b56453e3793356bcff3070b9b96445/lint.go#L770-L809) (e.g. HttpResponse -> HTTPResponse).
- `upper`
- `lower`

| Source | Snake Case | Kebab Case | Pascal Case | Camel Case | Go Pascal Case | Go Camel Case | Go Snake Case | Go KebabCase |
|----------------|------------------|------------------|----------------|----------------|----------------|----------------|------------------|------------------|
| GooID | goo_id | goo-id | GooId | gooId | gooID | GooID | goo_ID | goo-ID |
| HTTPStatusCode | http_status_code | http-status-code | HttpStatusCode | httpStatusCode | httpStatusCode | HTTPStatusCode | HTTP_status_code | HTTP-status-code |
| FooBAR | foo_bar | foo-bar | FooBar | fooBar | fooBar | FooBar | foo_bar | foo-bar |
| URL | url | url | Url | url | url | URL | URL | URL |
| ID | id | id | Id | id | id | ID | ID | ID |
| hostIP | host_ip | host-ip | HostIp | hostIp | hostIP | HostIP | host_IP | host-IP |
| JSON | json | json | Json | json | json | JSON | JSON | JSON |
| JSONName | json_name | json-name | JsonName | jsonName | jsonName | JSONName | JSON_name | JSON-name |
| NameJSON | name_json | name-json | NameJson | nameJson | nameJSON | NameJSON | name_JSON | name-JSON |
| UneTête | une_tête | une-tête | UneTête | uneTête | uneTête | UneTête | une_tête | une-tête |

## Examples

```go
Expand Down

0 comments on commit 5ef7dd5

Please sign in to comment.