endpoint: fix typos in jobid.go

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
This commit is contained in:
InsanePrawn 2020-02-20 18:27:12 +01:00 committed by Christian Schwarz
parent 3ff1966cab
commit 94caf8b8db

View File

@ -9,8 +9,8 @@ import (
"github.com/zrepl/zrepl/zfs" "github.com/zrepl/zrepl/zfs"
) )
// An instance of this type returned by MakeJobID guarantees // JobID instances returned by MakeJobID() guarantee their JobID.String()
// that that instance's JobID.String() can be used in a ZFS dataset name and hold tag. // can be used in ZFS dataset names and hold tags.
type JobID struct { type JobID struct {
jid string jid string
} }
@ -21,7 +21,7 @@ func MakeJobID(s string) (JobID, error) {
} }
if err := zfs.ComponentNamecheck(s); err != nil { if err := zfs.ComponentNamecheck(s); err != nil {
return JobID{}, errors.Wrap(err, "muse be usable as a dataset path component") return JobID{}, errors.Wrap(err, "must be usable as a dataset path component")
} }
if _, err := stepBookmarkNameImpl("pool/ds", 0xface601d, s); err != nil { if _, err := stepBookmarkNameImpl("pool/ds", 0xface601d, s); err != nil {
@ -34,7 +34,7 @@ func MakeJobID(s string) (JobID, error) {
} }
if _, err := lastReceivedHoldImpl(s); err != nil { if _, err := lastReceivedHoldImpl(s); err != nil {
return JobID{}, errors.Wrap(err, "must be usabel as a last-recieved-hold tag") return JobID{}, errors.Wrap(err, "must be usable as a last-received-hold tag")
} }
// FIXME replication cursor bookmark name // FIXME replication cursor bookmark name
@ -57,7 +57,7 @@ func MustMakeJobID(s string) JobID {
func (j JobID) expectInitialized() { func (j JobID) expectInitialized() {
if j.jid == "" { if j.jid == "" {
panic("use of unitialized JobID") panic("use of uninitialized JobID")
} }
} }