mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
Use slices.Delete
This commit is contained in:
@@ -90,7 +90,7 @@ func (r *SVCBResource) SetParam(key SVCParamKey, value []byte) {
|
||||
func (r *SVCBResource) DeleteParam(key SVCParamKey) bool {
|
||||
for i := range r.Params {
|
||||
if r.Params[i].Key == key {
|
||||
r.Params = append(r.Params[:i], r.Params[i+1:]...)
|
||||
r.Params = slices.Delete(r.Params, i, i+1)
|
||||
return true
|
||||
}
|
||||
if r.Params[i].Key > key {
|
||||
|
||||
Reference in New Issue
Block a user