google / google/go-github

Consistent naming for enterprise & organization scoped functions

Open
#3,761 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
11.3k
Forks
2.5k
Avg merge
1d 22h
Merged PRs (30d)
49

Description

I'd like to see a consistent naming convention used for enterprise and organization scoped functions that reflects the significance of the scoping. My suggestion is that we adopt the pattern `` which as a very simple example would look something like `GetOrganizationThing`. Scope and subject are an overlapping concept so we will need to define valid scopes that are linear (possibly just enterprise and organization). Subject is a more of an art than a science but we will still want to keep the most significant information at the beginning of the function name.

As an example of an alternative but supporting pattern; in a greenfield API design these scopes could have been structural with a pattern such as `client.organization.GetThing` instead of `client.GetOrganizationThing`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.