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: spec_linux.go
    path of file: ./repos/moby/vendor/tags.cncf.io/container-device-interface/pkg/cdi
    
    the code of the file until where you have to start completion: /*
   Copyright Â© 2022 The CDI Authors

   Licensed under the Apache License
    
func renameIn(dir, src, dst string, overwrite bool) error {
	var flags uint

	dirf, err := os.Open(dir)
	if err != nil {
		return fmt.Errorf("rename failed: %w", err)
	}
	defer dirf.Close()

	if !overwrite {
		flags = unix.RENAME_NOREPLACE
	}

	dirFd := int(dirf.Fd())
	err = unix.Renameat2(dirFd, src, dirFd, dst, flags)
	if err != nil {
		return fmt.Errorf("rename failed: %w", err)
	}

	return nil
}