github.com/powerman/golang-tools@v0.1.11-0.20220410185822-5ad214d8d803/internal/fastwalk/fastwalk_dirent_namlen_bsd.go (about)

     1  // Copyright 2018 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build darwin || freebsd || openbsd || netbsd
     6  // +build darwin freebsd openbsd netbsd
     7  
     8  package fastwalk
     9  
    10  import "syscall"
    11  
    12  func direntNamlen(dirent *syscall.Dirent) uint64 {
    13  	return uint64(dirent.Namlen)
    14  }