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

pkg/util/iptables: use buf.String() instead of string(buf.Bytes()) #118444

Conversation

TommyStarK
Copy link
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

When dealing with *bytes.Buffer, use buf.String() instead of string(buf.Bytes())

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 4, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/network Categorizes an issue or PR as relevant to SIG Network. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 4, 2023
@aojea
Copy link
Member

aojea commented Jun 4, 2023

/lgtm
/assign @danwinship

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 4, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a3ab3f7e1abf055486dd2b5527a74b1b1a6d3ceb

@danwinship
Copy link
Contributor

hm... ok... but actually, can you fix the uses in pkg/proxy/ipvs/proxier_test.go and pkg/proxy/util/utils_test.go too?

@TommyStarK TommyStarK force-pushed the pkg-util-iptables-clean-code-bytes-buffer branch from 0f6913d to 2959e60 Compare June 5, 2023 17:46
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2023
@TommyStarK
Copy link
Contributor Author

TommyStarK commented Jun 5, 2023

hm... ok... but actually, can you fix the uses in pkg/proxy/ipvs/proxier_test.go and pkg/proxy/util/utils_test.go too?

sure thing @danwinship, done in 1fcfd1d

Signed-off-by: TommyStarK <thomasmilox@gmail.com>
@TommyStarK TommyStarK force-pushed the pkg-util-iptables-clean-code-bytes-buffer branch from 2959e60 to 1fcfd1d Compare June 5, 2023 17:48
@TommyStarK
Copy link
Contributor Author

/retest-required

@danwinship
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 6, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: d464a18ef6b402506b1829a4dc3f64b1ae6aeee4

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship, TommyStarK

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 6, 2023
@k8s-ci-robot k8s-ci-robot merged commit 9bfb951 into kubernetes:master Jun 6, 2023
13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jun 6, 2023
@TommyStarK TommyStarK deleted the pkg-util-iptables-clean-code-bytes-buffer branch June 6, 2023 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ipvs area/kube-proxy cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants