Skip to content

Commit

Permalink
Add missing comments
Browse files Browse the repository at this point in the history
Fix `golint` issues for missing comments of exported functions and constants.
  • Loading branch information
HeavyWombat committed Jan 21, 2021
1 parent 18aad74 commit 965b0fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/apis/core/v1alpha1/condition_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ type Status struct {
Conditions Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

// GetCondition returns the condition based on the type
func (s *Status) GetCondition(t ConditionType) *Condition {
for _, cond := range s.Conditions {
if cond.Type == t {
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/buildrun/generate_taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func getStringTransformations(fullText string) string {
return fullText
}

// GenerateTaskSpec creates Tekton TaskRun spec to be used for a build run
func GenerateTaskSpec(
cfg *config.Config,
build *buildv1alpha1.Build,
Expand Down Expand Up @@ -173,6 +174,7 @@ func GenerateTaskSpec(
return &generatedTaskSpec, nil
}

// GenerateTaskRun creates a Tekton TaskRun to be used for a build run
func GenerateTaskRun(
cfg *config.Config,
build *buildv1alpha1.Build,
Expand Down
1 change: 1 addition & 0 deletions pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/shipwright-io/build/pkg/config"
)

// Labels used in Prometheus metrics
const (
BuildStrategyLabel string = "buildstrategy"
NamespaceLabel string = "namespace"
Expand Down
5 changes: 2 additions & 3 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@

package version

var (
Version = "0.0.1"
)
// Version describes the version of build
var Version = "0.0.1"

0 comments on commit 965b0fd

Please sign in to comment.