Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Naming Convention #2181

Open
DhritiShikhar opened this issue Jul 25, 2018 · 4 comments
Open

Naming Convention #2181

DhritiShikhar opened this issue Jul 25, 2018 · 4 comments

Comments

@DhritiShikhar
Copy link
Contributor

Expected behavior

There is a mix of naming convention in wit.

Example:
https://github.com/fabric8-services/fabric8-wit/blob/master/controller/test-files/iteration/show/ok.res.iteration.golden.json

active_status is snake case
startAt is camel case

Actual behavior

This is not harmful but we should really practice using one of the naming conventions for:
- better code readability
- consistency

@kwk
Copy link
Collaborator

kwk commented Jul 25, 2018

To make things worse, we also have - in member names: created-at. For go code we should follow:

Finally, the convention in Go is to use MixedCaps or mixedCaps rather than underscores to write multiword names.

(source: https://golang.org/doc/effective_go.html#mixed-caps)

@kwk
Copy link
Collaborator

kwk commented Jul 25, 2018

@DhritiShikhar you wrote: "There is a mix of naming convention in wit."

Do you mean in the response/request format or in the Go code.

@DhritiShikhar
Copy link
Contributor Author

response/request format @kwk

@kwk
Copy link
Collaborator

kwk commented Aug 3, 2018

See also https://github.com/golang/go/wiki/CodeReviewComments#mixed-caps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants