mirror of
https://github.com/fatedier/frp.git
synced 2025-08-04 20:49:04 +00:00
lint by golangci-lint (#3080)
This commit is contained in:
@@ -9,12 +9,12 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/onsi/ginkgo/config"
|
||||
|
||||
"github.com/fatedier/frp/test/e2e/mock/server"
|
||||
"github.com/fatedier/frp/test/e2e/pkg/port"
|
||||
"github.com/fatedier/frp/test/e2e/pkg/process"
|
||||
|
||||
"github.com/onsi/ginkgo"
|
||||
"github.com/onsi/ginkgo/config"
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
@@ -102,7 +102,8 @@ func (f *Framework) BeforeEach() {
|
||||
for k, v := range params {
|
||||
switch t := v.(type) {
|
||||
case int:
|
||||
f.usedPorts[k] = int(t)
|
||||
f.usedPorts[k] = t
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,14 +117,14 @@ func (f *Framework) AfterEach() {
|
||||
|
||||
// stop processor
|
||||
for _, p := range f.serverProcesses {
|
||||
p.Stop()
|
||||
_ = p.Stop()
|
||||
if TestContext.Debug {
|
||||
fmt.Println(p.ErrorOutput())
|
||||
fmt.Println(p.StdOutput())
|
||||
}
|
||||
}
|
||||
for _, p := range f.clientProcesses {
|
||||
p.Stop()
|
||||
_ = p.Stop()
|
||||
if TestContext.Debug {
|
||||
fmt.Println(p.ErrorOutput())
|
||||
fmt.Println(p.StdOutput())
|
||||
@@ -259,7 +260,7 @@ func (f *Framework) SetEnvs(envs []string) {
|
||||
|
||||
func (f *Framework) WriteTempFile(name string, content string) string {
|
||||
filePath := filepath.Join(f.TempDirectory, name)
|
||||
err := os.WriteFile(filePath, []byte(content), 0766)
|
||||
err := os.WriteFile(filePath, []byte(content), 0o766)
|
||||
ExpectNoError(err)
|
||||
return filePath
|
||||
}
|
||||
|
Reference in New Issue
Block a user