Problem
Many struct fields throughout the codebase lack documentation comments. This makes it harder for developers to understand the purpose and usage of fields, especially in public APIs and report structures.
Examples
pkg/report/application.go: Fields like ClusterTime, SchedulingInterval, LastGroupSyncTime in DRPCSummary and VRGSummary
pkg/report/clusters.go: Various fields in summary structs
Proposal
Add godoc comments for all exported struct fields, following Go documentation conventions:
type DRPCSummary struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
// ClusterTime is the API server time when the DRPC was gathered
ClusterTime *time.Time `json:"clusterTime,omitempty"`
// SchedulingInterval is the replication scheduling interval from the DRPolicy
SchedulingInterval ValidatedDuration `json:"schedulingInterval"`
// LastGroupSyncTime is the timestamp of the last successful volume synchronization
LastGroupSyncTime ValidatedTime `json:"lastGroupSyncTime"`
// ... other fields
}
Benefits
- Improved code readability
- Better IDE autocomplete and hover documentation
- Clearer API contracts
- Easier onboarding for new contributors
Problem
Many struct fields throughout the codebase lack documentation comments. This makes it harder for developers to understand the purpose and usage of fields, especially in public APIs and report structures.
Examples
pkg/report/application.go: Fields likeClusterTime,SchedulingInterval,LastGroupSyncTimeinDRPCSummaryandVRGSummarypkg/report/clusters.go: Various fields in summary structsProposal
Add godoc comments for all exported struct fields, following Go documentation conventions:
Benefits