diff options
| author | Shulhan <ms@kilabit.info> | 2025-01-23 03:40:50 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-01-23 03:41:10 +0700 |
| commit | 2a0694d2fa577574b505c4635eb8a824eaf88ddc (patch) | |
| tree | cce840739c7f59893c3a6a65a1600f9f857c484e /lib/sshconfig/section_match.go | |
| parent | 605d847b236dde031a2e387e74298d66a27b5e0a (diff) | |
| download | pakakeh.go-2a0694d2fa577574b505c4635eb8a824eaf88ddc.tar.xz | |
all: use for-range with numeric
Go 1.22 now support for-range on numeric value.
Diffstat (limited to 'lib/sshconfig/section_match.go')
| -rw-r--r-- | lib/sshconfig/section_match.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sshconfig/section_match.go b/lib/sshconfig/section_match.go index 4d9c7523..5baefc4d 100644 --- a/lib/sshconfig/section_match.go +++ b/lib/sshconfig/section_match.go @@ -1,6 +1,6 @@ -// Copyright 2020, Shulhan <ms@kilabit.info>. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info> +// +// SPDX-License-Identifier: BSD-3-Clause package sshconfig @@ -38,7 +38,8 @@ func newSectionMatch(cfg *Config, rawPattern string) (match *Section, err error) isNegate bool ) - for x := 0; x < len(args); x++ { + var x int + for ; x < len(args); x++ { token := strings.ToLower(args[x]) if x+1 < len(args) { arg = args[x+1] |
