mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Fix linter warnings
This commit is contained in:
parent
bd988724c4
commit
8ac80c2a12
7 changed files with 13 additions and 9 deletions
|
@ -116,6 +116,7 @@ type updateProfileIconResponse struct {
|
|||
Filename string `json:"filename"`
|
||||
}
|
||||
|
||||
//nolint:goconst
|
||||
func handleUpdateProfileIcon(ar *api.Request) (any, error) {
|
||||
// Check input.
|
||||
if len(ar.InputData) == 0 {
|
||||
|
|
|
@ -672,7 +672,7 @@ Current Features:
|
|||
- Disable Firefox' internal DNS-over-HTTPs resolver
|
||||
- Block direct access to public DNS resolvers
|
||||
|
||||
Please note that DNS bypass attempts might be additionally blocked in the Sytem D there too.`,
|
||||
Please note that DNS bypass attempts might be additionally blocked in the System DNS Client App.`,
|
||||
OptType: config.OptTypeInt,
|
||||
ExpertiseLevel: config.ExpertiseLevelUser,
|
||||
ReleaseLevel: config.ReleaseLevelStable,
|
||||
|
|
|
@ -163,7 +163,8 @@ func (fp fingerprintRegex) Match(value string) (score int) {
|
|||
return 0
|
||||
}
|
||||
|
||||
type parsedFingerprints struct {
|
||||
// ParsedFingerprints holds parsed fingerprints for fast usage.
|
||||
type ParsedFingerprints struct {
|
||||
tagPrints []matchingFingerprint
|
||||
envPrints []matchingFingerprint
|
||||
pathPrints []matchingFingerprint
|
||||
|
@ -171,8 +172,8 @@ type parsedFingerprints struct {
|
|||
}
|
||||
|
||||
// ParseFingerprints parses the fingerprints to make them ready for matching.
|
||||
func ParseFingerprints(raw []Fingerprint, deprecatedLinkedPath string) (parsed *parsedFingerprints, firstErr error) {
|
||||
parsed = &parsedFingerprints{}
|
||||
func ParseFingerprints(raw []Fingerprint, deprecatedLinkedPath string) (parsed *ParsedFingerprints, firstErr error) {
|
||||
parsed = &ParsedFingerprints{}
|
||||
|
||||
// Add deprecated LinkedPath to fingerprints, if they are empty.
|
||||
// TODO: Remove in v1.5
|
||||
|
@ -239,7 +240,7 @@ func ParseFingerprints(raw []Fingerprint, deprecatedLinkedPath string) (parsed *
|
|||
return parsed, firstErr
|
||||
}
|
||||
|
||||
func (parsed *parsedFingerprints) addMatchingFingerprint(fp Fingerprint, matchingPrint matchingFingerprint) {
|
||||
func (parsed *ParsedFingerprints) addMatchingFingerprint(fp Fingerprint, matchingPrint matchingFingerprint) {
|
||||
switch fp.Type {
|
||||
case FingerprintTypeTagID:
|
||||
parsed.tagPrints = append(parsed.tagPrints, matchingPrint)
|
||||
|
@ -257,7 +258,7 @@ func (parsed *parsedFingerprints) addMatchingFingerprint(fp Fingerprint, matchin
|
|||
|
||||
// MatchFingerprints returns the highest matching score of the given
|
||||
// fingerprints and matching data.
|
||||
func MatchFingerprints(prints *parsedFingerprints, md MatchingData) (highestScore int) {
|
||||
func MatchFingerprints(prints *ParsedFingerprints, md MatchingData) (highestScore int) {
|
||||
// Check tags.
|
||||
tags := md.Tags()
|
||||
if len(tags) > 0 {
|
||||
|
|
|
@ -257,7 +257,7 @@ profileFeed:
|
|||
return profile, nil
|
||||
}
|
||||
|
||||
func loadProfileFingerprints(r record.Record) (parsed *parsedFingerprints, err error) {
|
||||
func loadProfileFingerprints(r record.Record) (parsed *ParsedFingerprints, err error) {
|
||||
// Ensure it's a profile.
|
||||
profile, err := EnsureProfile(r)
|
||||
if err != nil {
|
||||
|
|
|
@ -103,6 +103,7 @@ var iconDB = database.NewInterface(&database.Options{
|
|||
Internal: true,
|
||||
})
|
||||
|
||||
// IconInDatabase represents an icon saved to the database.
|
||||
type IconInDatabase struct {
|
||||
sync.Mutex
|
||||
record.Base
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
)
|
||||
|
||||
// ProfileSource is the source of the profile.
|
||||
type ProfileSource string
|
||||
type ProfileSource string //nolint:golint
|
||||
|
||||
// Profile Sources.
|
||||
const (
|
||||
|
|
|
@ -8,11 +8,12 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/vincent-petithory/dataurl"
|
||||
|
||||
"github.com/safing/portbase/api"
|
||||
"github.com/safing/portbase/config"
|
||||
"github.com/safing/portbase/log"
|
||||
"github.com/safing/portmaster/profile"
|
||||
"github.com/vincent-petithory/dataurl"
|
||||
)
|
||||
|
||||
// ProfileExport holds an export of a profile.
|
||||
|
|
Loading…
Add table
Reference in a new issue