优化原生ssh连接代码
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"image/png"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -123,6 +124,10 @@ func IsFile(path string) bool {
|
||||
return !IsDir(path)
|
||||
}
|
||||
|
||||
func GetParentDirectory(directory string) string {
|
||||
return filepath.Dir(directory)
|
||||
}
|
||||
|
||||
// 去除重复元素
|
||||
func Distinct(a []string) []string {
|
||||
result := make([]string, 0, len(a))
|
||||
|
Reference in New Issue
Block a user