fix(lint): resolve data management staticcheck warnings
This commit is contained in:
@@ -55,8 +55,7 @@ type DataManagementAgentInfo struct {
|
||||
}
|
||||
|
||||
type DataManagementService struct {
|
||||
socketPath string
|
||||
dialTimeout time.Duration
|
||||
socketPath string
|
||||
}
|
||||
|
||||
func NewDataManagementService() *DataManagementService {
|
||||
@@ -64,16 +63,13 @@ func NewDataManagementService() *DataManagementService {
|
||||
}
|
||||
|
||||
func NewDataManagementServiceWithOptions(socketPath string, dialTimeout time.Duration) *DataManagementService {
|
||||
_ = dialTimeout
|
||||
path := strings.TrimSpace(socketPath)
|
||||
if path == "" {
|
||||
path = DefaultDataManagementAgentSocketPath
|
||||
}
|
||||
if dialTimeout <= 0 {
|
||||
dialTimeout = 500 * time.Millisecond
|
||||
}
|
||||
return &DataManagementService{
|
||||
socketPath: path,
|
||||
dialTimeout: dialTimeout,
|
||||
socketPath: path,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user