Skip to content

Commit

Permalink
chore: fixes godoc to use documented function name first
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszmajsak committed Sep 14, 2023
1 parent a3a485c commit 1738790
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apis/datasciencecluster/v1/datasciencecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/opendatahub-io/opendatahub-operator/v2/components/workbenches"
)

// Defines the desired state of DataScienceCluster
// DataScienceCluster defines the desired state of the cluster.
type DataScienceClusterSpec struct {
// Override and fine tune specific component configurations.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package datasciencecluster contains controller logic of CRD DSCInitialization
// Package dscinitialization contains controller logic of CRD DSCInitialization.
package dscinitialization

import (
Expand Down
2 changes: 1 addition & 1 deletion controllers/secretgenerator/secretgenerator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var secGenLog = log.Log.WithName("secret-generator")
// +kubebuilder:rbac:groups="route.openshift.io",resources=routes,verbs=get
// +kubebuilder:rbac:groups="core",resources=secrets/finalizers,verbs=*

// ReconcileSecretGenerator holds the controller configuration
// SecretGeneratorReconciler holds the controller configuration.
type SecretGeneratorReconciler struct {
Client client.Client
Scheme *runtime.Scheme
Expand Down
10 changes: 5 additions & 5 deletions controllers/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@ const (

// List of constants to show different reconciliation messages and statuses.
const (
// Used when multiple DSCI instance exists or DSC reconcile failed/removal failed
// ReconcileFailed is used when multiple DSCI instance exists or DSC reconcile failed/removal failed
ReconcileFailed = "ReconcileFailed"
ReconcileInit = "ReconcileInit"
ReconcileCompleted = "ReconcileCompleted"
ReconcileCompletedWithComponentErrors = "ReconcileCompletedWithComponentErrors"
ReconcileCompletedMessage = "Reconcile completed successfully"

// Defined constants represent extra Condition Type, used by .Condition.Type
// ConditionReconcileComplete represents extra Condition Type, used by .Condition.Type
ConditionReconcileComplete conditionsv1.ConditionType = "ReconcileComplete"
)

const (
ReadySuffix = "Ready"
)

// Function SetProgressingCondition sets the ProgressingCondition to True and other conditions to false or
// SetProgressingCondition sets the ProgressingCondition to True and other conditions to false or
// Unknown. Used when we are just starting to reconcile, and there are no existing conditions.
func SetProgressingCondition(conditions *[]conditionsv1.Condition, reason string, message string) {
conditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{
Expand Down Expand Up @@ -104,7 +104,7 @@ func SetProgressingCondition(conditions *[]conditionsv1.Condition, reason string
})
}

// Function SetErrorCondition sets the ConditionReconcileComplete to False in case of any errors
// SetErrorCondition sets the ConditionReconcileComplete to False in case of any errors
// during the reconciliation process.
func SetErrorCondition(conditions *[]conditionsv1.Condition, reason string, message string) {
conditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{
Expand Down Expand Up @@ -139,7 +139,7 @@ func SetErrorCondition(conditions *[]conditionsv1.Condition, reason string, mess
})
}

// Function SetCompleteCondition sets the ConditionReconcileComplete to True and other Conditions
// SetCompleteCondition sets the ConditionReconcileComplete to True and other Conditions
// to indicate that the reconciliation process has completed successfully.
func SetCompleteCondition(conditions *[]conditionsv1.Condition, reason string, message string) {
conditionsv1.SetStatusCondition(conditions, conditionsv1.Condition{
Expand Down

0 comments on commit 1738790

Please sign in to comment.