packagemain import( "fmt" "io/IoUtil" ) funcmain(){ skillfolder:=`D:\go\` //获取所有文件 files,_:=IoUtil.ReadDir(skillfolder) for_,file:=rangefiles{ iffile.IsDir(){ continue }else{ fmt.Println(file.Name()) } } }