pruning some codes

This commit is contained in:
Alireza Ahmadi
2023-05-10 19:17:27 +02:00
parent 7a36eda6b4
commit 128e027dac
5 changed files with 2 additions and 25 deletions

View File

@@ -6,8 +6,6 @@ import (
"x-ui/logger"
)
var CtxDone = errors.New("context done")
func NewErrorf(format string, a ...interface{}) error {
msg := fmt.Sprintf(format, a...)
return errors.New(msg)

View File

@@ -1,9 +0,0 @@
package common
import "sort"
func IsSubString(target string, str_array []string) bool {
sort.Strings(str_array)
index := sort.SearchStrings(str_array, target)
return index < len(str_array) && str_array[index] == target
}