Skip to content

Fix function comments based on best practices from Effective Go #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion account_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (t *AccountService) EstimateInvoice(mode string, planId int, paymentTerm in
return &v, nil
}

// Get Account Info
// Info gets Account Info
func (t *AccountService) Info() (*AccountInfoResponse, error) {
u := &url.Values{}
v := AccountInfoResponse{}
Expand Down
2 changes: 1 addition & 1 deletion api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type ApiResponse struct {
Data map[string]interface{}
}

// Get API Specs
// Spec gets API Specs
func (t *ApiService) Spec(v *ApiResponse) error {
u := &url.Values{}
if err := t.client.do("api.spec", u, &v.Response); err != nil {
Expand Down
14 changes: 7 additions & 7 deletions avail_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type StackScriptsResponse struct {
StackScripts []StackScript
}

// Get DataCenters
// DataCenters gets DataCenters
func (t *AvailService) DataCenters() (*AvailDataCentersResponse, error) {
u := &url.Values{}
v := AvailDataCentersResponse{}
Expand All @@ -61,7 +61,7 @@ func (t *AvailService) DataCenters() (*AvailDataCentersResponse, error) {
return &v, nil
}

// Get Distributions
// Distributions gets Distributions
func (t *AvailService) Distributions() (*AvailDistributionsResponse, error) {
u := &url.Values{}
v := AvailDistributionsResponse{}
Expand All @@ -75,7 +75,7 @@ func (t *AvailService) Distributions() (*AvailDistributionsResponse, error) {
return &v, nil
}

// Get Kernels
// Kernels gets Kernels
func (t *AvailService) Kernels() (*KernelsResponse, error) {
u := &url.Values{}
v := KernelsResponse{}
Expand All @@ -89,7 +89,7 @@ func (t *AvailService) Kernels() (*KernelsResponse, error) {
return &v, nil
}

// Get filtered Kernels
// FilterKernels gets filtered Kernels
func (t *AvailService) FilterKernels(isxen int, iskvm int) (*KernelsResponse, error) {
params := &url.Values{}
v := KernelsResponse{}
Expand All @@ -106,7 +106,7 @@ func (t *AvailService) FilterKernels(isxen int, iskvm int) (*KernelsResponse, er
return &v, nil
}

// Get Linode Plans
// LinodePlans gets Linode Plans
func (t *AvailService) LinodePlans() (*LinodePlansResponse, error) {
u := &url.Values{}
v := LinodePlansResponse{}
Expand All @@ -120,7 +120,7 @@ func (t *AvailService) LinodePlans() (*LinodePlansResponse, error) {
return &v, nil
}

// Get Node Balancers
// NodeBalancers gets Node Balancers
func (t *AvailService) NodeBalancers() (*NodeBalancersResponse, error) {
u := &url.Values{}
v := NodeBalancersResponse{}
Expand All @@ -134,7 +134,7 @@ func (t *AvailService) NodeBalancers() (*NodeBalancersResponse, error) {
return &v, nil
}

// Get All Stackscripts
// StackScripts gets All Stackscripts
func (t *AvailService) StackScripts() (*StackScriptsResponse, error) {
u := &url.Values{}
v := StackScriptsResponse{}
Expand Down
2 changes: 1 addition & 1 deletion linode_config_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type LinodeConfigResponse struct {
LinodeConfigId LinodeConfigId
}

// Get Config List. If configId is greater than 0, limit results to given config.
// List gets Config List. If configId is greater than 0, limit results to given config.
func (t *LinodeConfigService) List(linodeId int, configId int) (*LinodeConfigListResponse, error) {
u := &url.Values{}
if configId > 0 {
Expand Down
4 changes: 2 additions & 2 deletions linode_ip_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (t *LinodeIPService) List(linodeId int, ipAddressId int) (*LinodeIPListResp
return &v, nil
}

// Add Private IP
// AddPrivate adds Private IP
func (t *LinodeIPService) AddPrivate(linodeId int) (*LinodeIPAddressResponse, error) {
u := &url.Values{}
u.Add("LinodeID", strconv.Itoa(linodeId))
Expand All @@ -72,7 +72,7 @@ func (t *LinodeIPService) AddPrivate(linodeId int) (*LinodeIPAddressResponse, er
return &v, nil
}

// Add Public IP
// AddPublic adds Public IP
func (t *LinodeIPService) AddPublic(linodeId int) (*LinodeIPAddressResponse, error) {
u := &url.Values{}
u.Add("LinodeID", strconv.Itoa(linodeId))
Expand Down