Rewrite exec pipe, TCP and HTTP sources

This commit is contained in:
Alexey Khit
2023-05-04 11:52:36 +03:00
parent d44efb84a0
commit b5f4c7f75b
12 changed files with 224 additions and 110 deletions
+9
View File
@@ -29,6 +29,15 @@ func RandString(size, base byte) string {
return string(b)
}
func Any(errs ...error) error {
for _, err := range errs {
if err != nil {
return err
}
}
return nil
}
func Between(s, sub1, sub2 string) string {
i := strings.Index(s, sub1)
if i < 0 {