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

Spelling fixes #4312

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion mql/internal/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func (nodeData *CollectionFinisherNodeData) initialize() {
}
}

// consume marks the received dataponts as finished
// consume marks the received datapoints as finished
func (nodeData *CollectionFinisherNodeData) consume(from NodeID, data *envelope) {
if len(nodeData.remainingDatapoints) == 0 {
return
Expand Down
2 changes: 1 addition & 1 deletion providers-sdk/v1/inventory/asset_url.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
// group assets into hierarchical tree structures, that make it easy for us
// to put them into a box and reason about them.
//
// For example: A techology-centric view of the world would group a VM
// For example: A technology-centric view of the world would group a VM
// in a cloud environment like this:
// /aws/accountX/ec2/instances/linux/debian/8.0
//
Expand Down
2 changes: 1 addition & 1 deletion providers-sdk/v1/plugin/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewService() *Service {

var heartbeatRes HeartbeatRes

// FIXME: once we move to v12, remove the conf parametrer and remove the connId from the createRuntime function.
// FIXME: once we move to v12, remove the conf parameter and remove the connId from the createRuntime function.
// The connection ID will always be set before the connection call is done, so we don't need to do anything about it here.
// The parameters are needed now, only to make sure that old clients can work with new providers.
func (s *Service) AddRuntime(conf *inventory.Config, createRuntime func(connId uint32) (*Runtime, error)) (*Runtime, error) {
Expand Down
4 changes: 2 additions & 2 deletions providers-sdk/v1/plugin/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestAddRuntime(t *testing.T) {
// Wait until all runtimes are added
wg.Wait()

// Vertify that all runtimes are added and the last connectiod ID is correct
// Verify that all runtimes are added and the last connection ID is correct
assert.Len(t, s.runtimes, 200)
assert.Equal(t, s.lastConnectionID, uint32(0))
}
Expand Down Expand Up @@ -128,7 +128,7 @@ func TestDeprecatedAddRuntime(t *testing.T) {
// Wait until all runtimes are added
wg.Wait()

// Vertify that all runtimes are added and the last connectiod ID is correct
// Verify that all runtimes are added and the last connection ID is correct
assert.Len(t, s.runtimes, 200)
assert.Equal(t, s.lastConnectionID, uint32(200))
}
Expand Down
2 changes: 1 addition & 1 deletion providers-sdk/v1/util/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func commitChanges(confs updateConfs) error {
branchRef := plumbing.NewBranchReferenceName(branchName)

// Note: The branch may be local and thus won't be found in repo.Branch(branchName)
// This is consufing and I couldn't find any further docs on this behavior,
// This is confusing and I couldn't find any further docs on this behavior,
// but we have to work around it.
if _, err := repo.Reference(branchRef, true); err == nil {
err = repo.Storer.RemoveReference(branchRef)
Expand Down
2 changes: 1 addition & 1 deletion providers/ansible/play/playbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestPlaybookDecoding(t *testing.T) {
assert.Equal(t, "False", play.GatherFacts)
})

t.Run("load playbook with mulitple plays", func(t *testing.T) {
t.Run("load playbook with multiple plays", func(t *testing.T) {
data, err := os.ReadFile("./testdata/play_multi.yml")
require.NoError(t, err)

Expand Down
2 changes: 1 addition & 1 deletion providers/os/resources/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func initMachineSystem(runtime *plugin.Runtime, args map[string]*llx.RawData) (m
"serial": llx.StringData(biosInfo.SysInfo.SerialNumber),
"uuid": llx.StringData(biosInfo.SysInfo.UUID),
"sku": llx.StringData(biosInfo.SysInfo.SKU),
"family": llx.StringData(biosInfo.SysInfo.Familiy),
"family": llx.StringData(biosInfo.SysInfo.Family),
}, nil, nil
}

Expand Down
2 changes: 1 addition & 1 deletion providers/os/resources/smbios/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (s *LinuxSmbiosManager) Info() (*SmBiosInfo, error) {
case "chassis_version":
dst = &smInfo.ChassisInfo.Version
case "product_family":
dst = &smInfo.SysInfo.Familiy
dst = &smInfo.SysInfo.Family
case "product_name":
dst = &smInfo.SysInfo.Model
case "product_serial":
Expand Down
2 changes: 1 addition & 1 deletion providers/os/resources/smbios/smbios.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type SysInfo struct {
Version string
SerialNumber string
UUID string
Familiy string
Family string
SKU string
}

Expand Down
6 changes: 3 additions & 3 deletions providers/os/resources/smbios/smbios_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestManagerCentos(t *testing.T) {
Version: "1.2",
SerialNumber: "0",
UUID: "64f118d3-0060-4a4c-bf1f-a11d655c4d6f",
Familiy: "Virtual Machine",
Family: "Virtual Machine",
SKU: "",
},
BaseBoardInfo: BaseBoardInfo{
Expand Down Expand Up @@ -78,7 +78,7 @@ func TestManagerMacos(t *testing.T) {
Version: "1.0",
SerialNumber: "DAAAA111AA11",
UUID: "e126775d-2368-4f51-9863-76d5df0c8108",
Familiy: "",
Family: "",
SKU: "",
},
BaseBoardInfo: BaseBoardInfo{
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestManagerWindows(t *testing.T) {
Version: "None",
SerialNumber: "",
UUID: "16BD4D56-6B98-23F9-493C-F6B14E7CFC0B",
Familiy: "",
Family: "",
SKU: "",
},
BaseBoardInfo: BaseBoardInfo{
Expand Down
2 changes: 1 addition & 1 deletion providers/os/resources/updates/mac_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func ParseSoftwarePlistUpdates(input io.Reader) ([]OperatingSystemUpdate, error)
var r io.ReadSeeker
r, ok := input.(io.ReadSeeker)

// if the read seaker is not implemented lets cache stdout in-memory
// if the read seeker is not implemented lets cache stdout in-memory
if !ok {
packageList, err := io.ReadAll(input)
if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions providers/snowflake/connection/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"crypto/rsa"
"encoding/pem"
"errors"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/snowflakedb/gosnowflake"
"go.mondoo.com/cnquery/v11/providers-sdk/v1/inventory"
Expand Down Expand Up @@ -77,7 +78,7 @@ func NewSnowflakeConnection(id uint32, asset *inventory.Asset, conf *inventory.C
return conn, nil
}

func parsePrivateKey(privateKeyBytes []byte, passhrase []byte) (*rsa.PrivateKey, error) {
func parsePrivateKey(privateKeyBytes []byte, passphrase []byte) (*rsa.PrivateKey, error) {
privateKeyBlock, _ := pem.Decode(privateKeyBytes)
if privateKeyBlock == nil {
return nil, errors.New("could not decode private key")
Expand All @@ -86,11 +87,11 @@ func parsePrivateKey(privateKeyBytes []byte, passhrase []byte) (*rsa.PrivateKey,
var privateKey interface{}
var err error
if privateKeyBlock.Type == "ENCRYPTED PRIVATE KEY" {
if len(passhrase) == 0 {
if len(passphrase) == 0 {
return nil, errors.New("private key is encrypted, but no passphrase provided")
}

privateKey, err = ssh.ParseRawPrivateKeyWithPassphrase(privateKeyBlock.Bytes, passhrase)
privateKey, err = ssh.ParseRawPrivateKeyWithPassphrase(privateKeyBlock.Bytes, passphrase)
if err != nil {
return nil, errors.New("could not parse encrypted private key " + err.Error())
}
Expand Down
2 changes: 1 addition & 1 deletion providers/vsphere/connection/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (c *VsphereConnection) InstanceUUID() (string, error) {
return "", err
}

// NOTE: we do not use the ESXi host identifier here to distingush between the API and the host itself
// NOTE: we do not use the ESXi host identifier here to distinguish between the API and the host itself
return host.Reference().Value, nil
}

Expand Down
2 changes: 1 addition & 1 deletion utils/multierr/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
)

// withMessage and methods are taken frmo https://github.com/pkg/errors
// withMessage and methods are taken from https://github.com/pkg/errors
// under BSD-2-Clause license

type withMessage struct {
Expand Down
Loading