forked from go/golangs_learn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
447 B
17 lines
447 B
4 years ago
|
package final_common
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"strings"
|
||
|
)
|
||
|
|
||
|
/**
|
||
|
获取文件名称
|
||
|
*/
|
||
|
func ReadFileName() string {
|
||
|
aaa := os.Args //当前目录数组
|
||
|
aaastr := aaa[0] //当前目录字符串
|
||
|
aaasz := strings.Split(aaastr, "\\") //获取文件目录数组
|
||
|
return strings.Replace(aaasz[len(aaasz)-1], ".exe", "", 1) //获取操作程序名称
|
||
|
}
|