分类: Go

1 篇文章

thumbnail
初学GoLang,拷贝文件
如需执行需要进入到该文件所在的目录,然后运行如下命令: go run File.go 代码如下: package main import ( "bufio" "fmt" "io" "os" ) // CopyFile destPath 目标文件路径 srcPath 源文件路径 func CopyFile(destPath string, srcPa…