Skip to content

Commit e885abe

Browse files
authored
Fix formatting of nlink on other platforms (#1295)
1 parent 2ab4b14 commit e885abe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

os.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"os/user"
1111
"path/filepath"
1212
"runtime"
13-
"strconv"
1413
"strings"
1514
"syscall"
1615

@@ -210,7 +209,7 @@ func groupName(f os.FileInfo) string {
210209

211210
func linkCount(f os.FileInfo) string {
212211
if stat, ok := f.Sys().(*syscall.Stat_t); ok {
213-
return strconv.FormatUint(stat.Nlink, 10)
212+
return fmt.Sprint(stat.Nlink)
214213
}
215214
return ""
216215
}

0 commit comments

Comments
 (0)