Skip to content

Commit

Permalink
Add periods in full sentence comments (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonAlling authored and Andres Martinez Gotor committed Jan 14, 2020
1 parent 898eee1 commit 4c489fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions cmd/kubeops/internal/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type Config struct {
ChartClient chartUtils.Resolver
}

// NewInClusterConfig returns an internal cluster config replacing the token
// NewInClusterConfig returns an internal cluster config replacing the token.
func NewInClusterConfig(token string) (*rest.Config, error) {
config, err := rest.InClusterConfig()
if err != nil {
Expand Down Expand Up @@ -109,7 +109,7 @@ func AddRouteWith(
}
}

// ListReleases list existing releases
// ListReleases list existing releases.
func ListReleases(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params) {
apps, err := agent.ListReleases(cfg.ActionConfig, params[namespaceParam], cfg.Options.ListLimit, req.URL.Query().Get("statuses"))
if err != nil {
Expand All @@ -119,12 +119,12 @@ func ListReleases(cfg Config, w http.ResponseWriter, req *http.Request, params h
response.NewDataResponse(apps).Write(w)
}

// ListAllReleases list all the releases available
// ListAllReleases list all the releases available.
func ListAllReleases(cfg Config, w http.ResponseWriter, req *http.Request, _ handlerutil.Params) {
ListReleases(cfg, w, req, make(map[string]string))
}

// CreateRelease creates a release
// CreateRelease creates a release.
func CreateRelease(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params) {
chartDetails, chartMulti, err := handlerutil.ParseAndGetChart(req, cfg.ChartClient, isV1SupportRequired)
if err != nil {
Expand Down Expand Up @@ -203,7 +203,7 @@ func rollbackRelease(cfg Config, w http.ResponseWriter, req *http.Request, param
response.NewDataResponse(compatRelease).Write(w)
}

// GetRelease returns a release
// GetRelease returns a release.
func GetRelease(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params) {
// Namespace is already known by the RESTClientGetter.
releaseName := params[nameParam]
Expand All @@ -220,7 +220,7 @@ func GetRelease(cfg Config, w http.ResponseWriter, req *http.Request, params han
response.NewDataResponse(compatRelease).Write(w)
}

// DeleteRelease deletes a release
// DeleteRelease deletes a release.
func DeleteRelease(cfg Config, w http.ResponseWriter, req *http.Request, params handlerutil.Params) {
releaseName := params[nameParam]
purge := handlerutil.QueryParamIsTruthy("purge", req)
Expand Down
6 changes: 3 additions & 3 deletions pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func UpgradeRelease(actionConfig *action.Configuration, name, valuesYaml string,
return res, nil
}

// RollbackRelease rolls back a release to the specified revision
// RollbackRelease rolls back a release to the specified revision.
func RollbackRelease(actionConfig *action.Configuration, releaseName string, revision int) (*release.Release, error) {
log.Printf("Rolling back %s to revision %d.", releaseName, revision)
rollback := action.NewRollback(actionConfig)
Expand Down Expand Up @@ -151,7 +151,7 @@ func NewActionConfig(storageForDriver StorageForDriver, config *rest.Config, cli
return actionConfig, nil
}

// NewConfigFlagsFromCluster returns ConfigFlags with default values set from within cluster
// NewConfigFlagsFromCluster returns ConfigFlags with default values set from within cluster.
func NewConfigFlagsFromCluster(namespace string, clusterConfig *rest.Config) *genericclioptions.ConfigFlags {
impersonateGroup := []string{}
insecure := false
Expand All @@ -168,7 +168,7 @@ func NewConfigFlagsFromCluster(namespace string, clusterConfig *rest.Config) *ge
}
}

// Values is a type alias for values.yaml
// Values is a type alias for values.yaml.
type Values map[string]interface{}

func getValues(raw []byte) (Values, error) {
Expand Down

0 comments on commit 4c489fa

Please sign in to comment.