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/git | |
| 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/git')
| -rw-r--r-- | lib/git/git.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/git/git.go b/lib/git/git.go index 151e077a..71240221 100644 --- a/lib/git/git.go +++ b/lib/git/git.go @@ -1,6 +1,6 @@ -// Copyright 2018, 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: 2018 M. Shulhan <ms@kilabit.info> +// +// SPDX-License-Identifier: BSD-3-Clause // Package git provide a wrapper for git command line interface. package git @@ -280,7 +280,7 @@ func ListTags(repoDir string) (tags []string, err error) { sep := []byte{'\n'} btags := bytes.Split(bout, sep) - for x := 0; x < len(btags); x++ { + for x := range len(btags) { if len(btags[x]) == 0 { continue } @@ -361,7 +361,7 @@ func RemoteBranches(repoDir string) ([]string, error) { var branches []string bHEAD := []byte("HEAD") - for x := 0; x < len(bbranches); x++ { + for x := range len(bbranches) { if len(bbranches[x]) == 0 { continue } |
