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

chore: fix function names in comment #38800

Merged
merged 3 commits into from
Apr 30, 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 dev-tools/mage/kubernetes/kuberemote.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"encoding/pem"
"fmt"
"io"
"io/ioutil"

Check failure on line 30 in dev-tools/mage/kubernetes/kuberemote.go

View workflow job for this annotation

GitHub Actions / lint (windows)

SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
"net"
"net/http"
"net/url"
Expand Down Expand Up @@ -127,11 +127,11 @@
if err != nil {
return err
}
go f.ForwardPorts()

Check failure on line 130 in dev-tools/mage/kubernetes/kuberemote.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value of `f.ForwardPorts` is not checked (errcheck)
<-readyChannel

// perform the rsync
r.rsync(randomPort, stderr, stderr)

Check failure on line 134 in dev-tools/mage/kubernetes/kuberemote.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value of `r.rsync` is not checked (errcheck)

// stop port forwarding
close(stopChannel)
Expand Down Expand Up @@ -250,7 +250,7 @@
return nil, err
}

// portFoward runs the port forwarding so SSH rsync can be ran into the pod.
// portForward runs the port forwarding so SSH rsync can be ran into the pod.
func (r *KubeRemote) portForward(ports []string, stopChannel, readyChannel chan struct{}, stdout, stderr io.Writer) (*portforward.PortForwarder, error) {
roundTripper, upgrader, err := spdy.RoundTripperFor(r.cfg)
if err != nil {
Expand All @@ -258,7 +258,7 @@
}

path := fmt.Sprintf("/api/v1/namespaces/%s/pods/%s/portforward", r.namespace, r.name)
hostIP := strings.TrimLeft(r.cfg.Host, "https://")

Check failure on line 261 in dev-tools/mage/kubernetes/kuberemote.go

View workflow job for this annotation

GitHub Actions / lint (windows)

SA1024: cutset contains duplicate characters (staticcheck)
serverURL := url.URL{Scheme: "https", Path: path, Host: hostIP}
dialer := spdy.NewDialer(upgrader, &http.Client{Transport: roundTripper}, http.MethodPost, &serverURL)
return portforward.New(dialer, ports, stopChannel, readyChannel, stdout, stderr)
Expand Down Expand Up @@ -542,7 +542,7 @@
}

func isScheduled(pod *apiv1.Pod) bool {
if &pod.Status != nil && len(pod.Status.Conditions) > 0 {

Check failure on line 545 in dev-tools/mage/kubernetes/kuberemote.go

View workflow job for this annotation

GitHub Actions / lint (windows)

SA4022: the address of a variable cannot be nil (staticcheck)
for _, condition := range pod.Status.Conditions {
if condition.Type == apiv1.PodScheduled &&
condition.Status == apiv1.ConditionTrue {
Expand All @@ -554,7 +554,7 @@
}

func isInitContainersRunning(pod *apiv1.Pod) bool {
if &pod.Status != nil {

Check failure on line 557 in dev-tools/mage/kubernetes/kuberemote.go

View workflow job for this annotation

GitHub Actions / lint (windows)

SA4022: the address of a variable cannot be nil (staticcheck)
if len(pod.Spec.InitContainers) != len(pod.Status.InitContainerStatuses) {
return false
}
Expand Down Expand Up @@ -621,7 +621,7 @@

func createTempFile(content []byte) (string, error) {
randBytes := make([]byte, 16)
rand.Read(randBytes)

Check failure on line 624 in dev-tools/mage/kubernetes/kuberemote.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value of `rand.Read` is not checked (errcheck)
tmpfile, err := ioutil.TempFile("", hex.EncodeToString(randBytes))
if err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion filebeat/input/filestream/environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ func (e *inputTestingEnvironment) waitUntilHarvesterIsDone() {
}
}

// requireEventReceived requires that the list of messages has made it into the output.
// requireEventsReceived requires that the list of messages has made it into the output.
func (e *inputTestingEnvironment) requireEventsReceived(events []string) {
foundEvents := make([]bool, len(events))
checkedEventCount := 0
Expand Down
Loading