use typos instead of codespell (#19088)

This commit is contained in:
Harshavardhana
2024-02-21 22:26:06 -08:00
committed by GitHub
parent 56887f3208
commit 53aa8f5650
38 changed files with 197 additions and 179 deletions

View File

@@ -84,7 +84,7 @@ func TestParseLegalHoldStatus(t *testing.T) {
}
// TestUnmarshalDefaultRetention checks if default retention
// marshaling and unmarshaling work as expected
// marshaling and unmarshalling work as expected
func TestUnmarshalDefaultRetention(t *testing.T) {
days := uint64(4)
years := uint64(1)

View File

@@ -159,7 +159,7 @@ var NotifySubSystems = set.CreateStringSet(
NotifyWebhookSubSys,
)
// LambdaSubSystems - all lambda sub-systesm
// LambdaSubSystems - all lambda sub-systems
var LambdaSubSystems = set.CreateStringSet(
LambdaWebhookSubSys,
)

View File

@@ -299,7 +299,7 @@ func checkValidNotificationKeysForSubSys(subSys string, tgt map[string]config.KV
return nil
}
// DefaultKakfaKVS - default KV for kafka target
// DefaultKafkaKVS - default KV for kafka target
var (
DefaultKafkaKVS = config.KVS{
config.KV{

View File

@@ -28,7 +28,7 @@ import (
// RemoveSensitiveHeaders removes confidential encryption
// information - e.g. the SSE-C key - from the HTTP headers.
// It has the same semantics as RemoveSensitiveEntires.
// It has the same semantics as RemoveSensitiveEntries.
func RemoveSensitiveHeaders(h http.Header) {
h.Del(xhttp.AmzServerSideEncryptionCustomerKey)
h.Del(xhttp.AmzServerSideEncryptionCopyCustomerKey)

View File

@@ -254,7 +254,7 @@ func (dm *DRWMutex) lockBlocking(ctx context.Context, lockLossCallback func(), i
log("lockBlocking %s/%s for %#v: granted\n", id, source, dm.Names)
// Refresh lock continuously and cancel if there is no quorum in the lock anymore
dm.startContinousLockRefresh(lockLossCallback, id, source, quorum)
dm.startContinuousLockRefresh(lockLossCallback, id, source, quorum)
return locked
}
@@ -272,7 +272,7 @@ func (dm *DRWMutex) lockBlocking(ctx context.Context, lockLossCallback func(), i
}
}
func (dm *DRWMutex) startContinousLockRefresh(lockLossCallback func(), id, source string, quorum int) {
func (dm *DRWMutex) startContinuousLockRefresh(lockLossCallback func(), id, source string, quorum int) {
ctx, cancel := context.WithCancel(context.Background())
dm.m.Lock()

View File

@@ -124,17 +124,17 @@ func Init(goPath string, goRoot string) {
var goRootList []string
var defaultgoPathList []string
var defaultgoRootList []string
pathSeperator := ":"
pathSeparator := ":"
// Add all possible GOPATH paths into trimStrings
// Split GOPATH depending on the OS type
if runtime.GOOS == "windows" {
pathSeperator = ";"
pathSeparator = ";"
}
goPathList = strings.Split(goPath, pathSeperator)
goRootList = strings.Split(goRoot, pathSeperator)
defaultgoPathList = strings.Split(build.Default.GOPATH, pathSeperator)
defaultgoRootList = strings.Split(build.Default.GOROOT, pathSeperator)
goPathList = strings.Split(goPath, pathSeparator)
goRootList = strings.Split(goRoot, pathSeparator)
defaultgoPathList = strings.Split(build.Default.GOPATH, pathSeparator)
defaultgoRootList = strings.Split(build.Default.GOROOT, pathSeparator)
// Add trim string "{GOROOT}/src/" into trimStrings
trimStrings = []string{filepath.Join(runtime.GOROOT(), "src") + string(filepath.Separator)}

View File

@@ -163,7 +163,7 @@ func (h *Target) Init(ctx context.Context) error {
if err := h.init(); err != nil {
return err
}
go h.startKakfaLogger()
go h.startKafkaLogger()
return nil
}
@@ -181,7 +181,7 @@ func (h *Target) initQueueStore(ctx context.Context) (err error) {
return
}
func (h *Target) startKakfaLogger() {
func (h *Target) startKafkaLogger() {
h.logChMu.RLock()
logCh := h.logCh
if logCh != nil {

View File

@@ -307,7 +307,7 @@ func NewReader(readCloser io.ReadCloser, args *ReaderArgs) (*Reader, error) {
ret.Comment = []rune(args.CommentCharacter)[0]
ret.Quote = []rune{}
if len([]rune(args.QuoteCharacter)) > 0 {
// Add the first rune of args.QuoteChracter
// Add the first rune of args.QuoteCharacter
ret.Quote = append(ret.Quote, []rune(args.QuoteCharacter)[0])
}
ret.QuoteEscape = []rune(args.QuoteEscapeCharacter)[0]

View File

@@ -25,11 +25,11 @@ import (
)
var (
errKeyLookup = errors.New("Cannot look up key in non-object value")
errIndexLookup = errors.New("Cannot look up array index in non-array value")
errWildcardObjectLookup = errors.New("Object wildcard used on non-object value")
errWildcardArrayLookup = errors.New("Array wildcard used on non-array value")
errWilcardObjectUsageInvalid = errors.New("Invalid usage of object wildcard")
errKeyLookup = errors.New("Cannot look up key in non-object value")
errIndexLookup = errors.New("Cannot look up array index in non-array value")
errWildcardObjectLookup = errors.New("Object wildcard used on non-object value")
errWildcardArrayLookup = errors.New("Array wildcard used on non-array value")
errWildcardObjectUsageInvalid = errors.New("Invalid usage of object wildcard")
)
// jsonpathEval evaluates a JSON path and returns the value at the path.
@@ -85,13 +85,13 @@ func jsonpathEval(p []*JSONPathElement, v interface{}) (r interface{}, flat bool
switch kvs := v.(type) {
case jstream.KVS:
if len(p[1:]) > 0 {
return nil, false, errWilcardObjectUsageInvalid
return nil, false, errWildcardObjectUsageInvalid
}
return kvs, false, nil
case simdjson.Object:
if len(p[1:]) > 0 {
return nil, false, errWilcardObjectUsageInvalid
return nil, false, errWildcardObjectUsageInvalid
}
return kvs, false, nil