From 5ef7dd5a868d2cf176d3a826249c6a2e373310f5 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 12 Apr 2021 14:20:39 +0200 Subject: [PATCH] doc: add example. --- readme.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 91e99c0..fb92d32 100644 --- a/readme.md +++ b/readme.md @@ -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