You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: syscall_darwin.go
    path of file: ./repos/docker-ce/components/engine/vendor/golang.org/x/sys/unix
    
    the code of the file until where you have to start completion: // Copyright 2009,2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Darwin system calls.
// This file is compiled as ordinary Go code,
// but it is also input to mksyscall,
// which parses the //sys lines and generates system call stubs.
// Note that sometimes we use a lowercase //sys name and wrap
// it in our own nicer implementation, either here or in
// syscall_bsd.go or syscall_unix.go.

package unix

import (
	"fmt"
	"runtime"
	"syscall"
	"unsafe"
)

// SockaddrDatalink implements the
    
func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
	mib, err := sysctlmib(name)
	if err != nil {
		return nil, err
	}

	// Find size.
	n := uintptr(0)
	if err := sysctl(mib, nil, &n, nil, 0); err != nil {
		return nil, err
	}
	if n == 0 {
		return nil, nil
	}
	if n%SizeofKinfoProc != 0 {
		return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
	}

	// Read into buffer of that size.
	buf := make([]KinfoProc, n/SizeofKinfoProc)
	if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil {
		return nil, err
	}
	if n%SizeofKinfoProc != 0 {
		return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc)
	}

	// The actual call may return less than the original reported required
	// size so ensure we deal with that.
	return buf[:n/SizeofKinfoProc], nil
}