mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Fix tests and linter errors
This commit is contained in:
parent
cfafbfca4e
commit
b9c5bee864
3 changed files with 8 additions and 7 deletions
|
@ -9,7 +9,8 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
// Windows specific constants for the WSAIoctl interface.
|
||||||
|
const ( //nolint:golint
|
||||||
SIO_RCVALL = syscall.IOC_IN | syscall.IOC_VENDOR | 1
|
SIO_RCVALL = syscall.IOC_IN | syscall.IOC_VENDOR | 1
|
||||||
|
|
||||||
RCVALL_OFF = 0
|
RCVALL_OFF = 0
|
||||||
|
|
|
@ -22,8 +22,8 @@ const (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
profileDB = database.NewInterface(&database.Options{
|
profileDB = database.NewInterface(&database.Options{
|
||||||
Local: true,
|
Local: true,
|
||||||
Internal: true,
|
Internal: true,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -220,10 +220,6 @@ func parseEndpoint(value string) (endpoint Endpoint, err error) { //nolint:gocog
|
||||||
if endpoint, err = parseTypeIPRange(fields); endpoint != nil || err != nil {
|
if endpoint, err = parseTypeIPRange(fields); endpoint != nil || err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// domain
|
|
||||||
if endpoint, err = parseTypeDomain(fields); endpoint != nil || err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// country
|
// country
|
||||||
if endpoint, err = parseTypeCountry(fields); endpoint != nil || err != nil {
|
if endpoint, err = parseTypeCountry(fields); endpoint != nil || err != nil {
|
||||||
return
|
return
|
||||||
|
@ -240,6 +236,10 @@ func parseEndpoint(value string) (endpoint Endpoint, err error) { //nolint:gocog
|
||||||
if endpoint, err = parseTypeList(fields); endpoint != nil || err != nil {
|
if endpoint, err = parseTypeList(fields); endpoint != nil || err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// domain
|
||||||
|
if endpoint, err = parseTypeDomain(fields); endpoint != nil || err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
return nil, fmt.Errorf(`unknown endpoint definition: "%s"`, value)
|
return nil, fmt.Errorf(`unknown endpoint definition: "%s"`, value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue