Skip to content
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

catpb: make JobID implement fmt.Stringer #110978

Merged
merged 1 commit into from
Sep 20, 2023
Merged
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
7 changes: 7 additions & 0 deletions pkg/sql/catalog/catpb/job_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

package catpb

import "strconv"

// JobID is the ID of a job. It is defined here and imported in jobspb because
// jobs are referenced in descriptors and also jobs reference parts of
// descriptors. This avoids any dependency cycles.
Expand All @@ -20,3 +22,8 @@ const InvalidJobID JobID = 0

// SafeValue implements the redact.SafeValue interface.
func (j JobID) SafeValue() {}

// String implements the fmt.Stringer interface.
func (j JobID) String() string {
return strconv.Itoa(int(j))
}