Commit ac99666e authored by Lorac's avatar Lorac Committed by Sander van Harmelen

Followed go style guide recommendations to clear lint warnings (#324)

* Fix golint warning about exported methods

* Fix typo (+1 squashed commits)

Squashed commits:

[89721e6] typo fix

* golint warns for fields named ...Id and suggests renaming to ...ID same for API
parent 9c000aa5
......@@ -222,7 +222,7 @@ type Client struct {
client *http.Client
// Base URL for API requests. Defaults to the public GitLab API, but can be
// set to a domain endpoint to use with aself hosted GitLab server. baseURL
// set to a domain endpoint to use with a self hosted GitLab server. baseURL
// should always be specified with a trailing slash.
baseURL *url.URL
......
......@@ -29,6 +29,9 @@ type IssueLinksService struct {
client *Client
}
// IssueLink represents a two-way relation between two issues.
//
// GitLab API docs: https://docs.gitlab.com/ee/api/issue_links.html
type IssueLink struct {
SourceIssue *Issue `json:"source_issue"`
TargetIssue *Issue `json:"target_issue"`
......@@ -62,6 +65,9 @@ func (s *IssueLinksService) ListIssueRelations(pid interface{}, issueIID int, op
return is, resp, err
}
// CreateIssueLinkOptions represents the available CreateIssueLink() options.
//
// GitLab API docs: https://docs.gitlab.com/ee/api/issue_links.html
type CreateIssueLinkOptions struct {
TargetProjectID *string `json:"target_project_id"`
TargetIssueIID *string `json:"target_issue_iid"`
......
......@@ -324,7 +324,7 @@ func (s *JobsService) KeepArtifacts(pid interface{}, jobID int, options ...Optio
return job, resp, err
}
// PlayJob triggers a nanual action to start a job.
// PlayJob triggers a manual action to start a job.
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/jobs.html#play-a-job
......
......@@ -73,7 +73,7 @@ type MergeRequest struct {
MergeCommitSHA string `json:"merge_commit_sha"`
UserNotesCount int `json:"user_notes_count"`
ChangesCount string `json:"changes_count"`
SouldRemoveSourceBranch bool `json:"should_remove_source_branch"`
ShouldRemoveSourceBranch bool `json:"should_remove_source_branch"`
ForceRemoveSourceBranch bool `json:"force_remove_source_branch"`
WebURL string `json:"web_url"`
DiscussionLocked bool `json:"discussion_locked"`
......@@ -583,7 +583,7 @@ func (s *MergeRequestsService) GetSingleMergeRequestDiffVersion(pid interface{},
return v, resp, err
}
// Subscribe subscribes the authenticated user to the given merge request
// SubscribeToMergeRequest subscribes the authenticated user to the given merge request
// to receive notifications. If the user is already subscribed to the
// merge request, the status code 304 is returned.
//
......@@ -610,7 +610,7 @@ func (s *MergeRequestsService) SubscribeToMergeRequest(pid interface{}, mergeReq
return m, resp, err
}
// Unsubscribe unsubscribes the authenticated user from the given merge request
// UnsubscribeFromMergeRequest unsubscribes the authenticated user from the given merge request
// to not receive notifications from that merge request. If the user is
// not subscribed to the merge request, status code 304 is returned.
//
......
......@@ -158,7 +158,7 @@ type ForkParent struct {
WebURL string `json:"web_url"`
}
// Links represents a project web liks for self, issues, merge_requests,
// Links represents a project web links for self, issues, merge_requests,
// repo_branches, labels, events, members.
type Links struct {
Self string `json:"self"`
......
......@@ -36,7 +36,7 @@ type Settings struct {
AdminNotificationEmail string `json:"admin_notification_email"`
AfterSignOutPath string `json:"after_sign_out_path"`
AfterSignUpText string `json:"after_sign_up_text"`
AkismetApiKey string `json:"akismet_api_key"`
AkismetAPIKey string `json:"akismet_api_key"`
AkismetEnabled bool `json:"akismet_enabled"`
CircuitbreakerAccessRetries int `json:"circuitbreaker_access_retries"`
CircuitbreakerBackoffThreshold int `json:"circuitbreaker_backoff_threshold"`
......@@ -88,7 +88,7 @@ type Settings struct {
MetricsTimeout int `json:"metrics_timeout"`
PasswordAuthenticationEnabledForWeb bool `json:"password_authentication_enabled_for_web"`
PasswordAuthenticationEnabledForGit bool `json:"password_authentication_enabled_for_git"`
PerformanceBarAllowedGroupId string `json:"performance_bar_allowed_group_id"`
PerformanceBarAllowedGroupID string `json:"performance_bar_allowed_group_id"`
PerformanceBarEnabled bool `json:"performance_bar_enabled"`
PlantumlEnabled bool `json:"plantuml_enabled"`
PlantumlURL string `json:"plantuml_url"`
......@@ -156,7 +156,7 @@ type UpdateSettingsOptions struct {
AdminNotificationEmail *string `url:"admin_notification_email,omitempty" json:"admin_notification_email,omitempty"`
AfterSignOutPath *string `url:"after_sign_out_path,omitempty" json:"after_sign_out_path,omitempty"`
AfterSignUpText *string `url:"after_sign_up_text,omitempty" json:"after_sign_up_text,omitempty"`
AkismetApiKey *string `url:"akismet_api_key,omitempty" json:"akismet_api_key,omitempty"`
AkismetAPIKey *string `url:"akismet_api_key,omitempty" json:"akismet_api_key,omitempty"`
AkismetEnabled *bool `url:"akismet_enabled,omitempty" json:"akismet_enabled,omitempty"`
CircuitbreakerAccessRetries *int `url:"circuitbreaker_access_retries,omitempty" json:"circuitbreaker_access_retries,omitempty"`
CircuitbreakerBackoffThreshold *int `url:"circuitbreaker_backoff_threshold,omitempty" json:"circuitbreaker_backoff_threshold,omitempty"`
......@@ -208,7 +208,7 @@ type UpdateSettingsOptions struct {
MetricsTimeout *int `url:"metrics_timeout,omitempty" json:"metrics_timeout,omitempty"`
PasswordAuthenticationEnabledForWeb *bool `url:"password_authentication_enabled_for_web,omitempty" json:"password_authentication_enabled_for_web,omitempty"`
PasswordAuthenticationEnabledForGit *bool `url:"password_authentication_enabled_for_git,omitempty" json:"password_authentication_enabled_for_git,omitempty"`
PerformanceBarAllowedGroupId *string `url:"performance_bar_allowed_group_id,omitempty" json:"performance_bar_allowed_group_id,omitempty"`
PerformanceBarAllowedGroupID *string `url:"performance_bar_allowed_group_id,omitempty" json:"performance_bar_allowed_group_id,omitempty"`
PerformanceBarEnabled *bool `url:"performance_bar_enabled,omitempty" json:"performance_bar_enabled,omitempty"`
PlantumlEnabled *bool `url:"plantuml_enabled,omitempty" json:"plantuml_enabled,omitempty"`
PlantumlURL *string `url:"plantuml_url,omitempty" json:"plantuml_url,omitempty"`
......
......@@ -88,7 +88,7 @@ func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc)
return h, resp, err
}
// HookEvent represents an event triggert by a GitLab system hook.
// HookEvent represents an event trigger by a GitLab system hook.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html
type HookEvent struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment