namep, err := syscall.UTF16PtrFromString(path)
if err != nil {
log.Println(err)
}
if err := syscall.SetFileAttributes(namep,syscall.FILE_ATTRIBUTE_HIDDEN);err != nil{
log.Println("syscall err =",err)
}
有疑问加站长微信联系(非本文作者)