Pull request 2097: 6420-ipset-currenly-known-sets
Updates #6420.
Squashed commit of the following:
commit 9c08b4206845547bae07b5c456eaf74df4d55921
Merge: a9ee2fe56 083abaac0
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Wed Dec 6 19:20:53 2023 +0300
Merge branch 'master' into 6420-ipset-currenly-known-sets
commit a9ee2fe5603168ce75a5c8cba5b2356c039b0970
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Wed Dec 6 18:26:01 2023 +0300
all: imp docs
commit fabaab0cc40256cb486366e1cc2d345159178cd1
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Wed Dec 6 15:00:58 2023 +0300
ipset: currently known sets
This commit is contained in:
@@ -339,9 +339,6 @@ func (r dayRange) toDayConfigJSON() (j *dayConfigJSON) {
|
||||
|
||||
// weeklyConfigJSON is the JSON configuration structure of Weekly.
|
||||
type weeklyConfigJSON struct {
|
||||
// TimeZone is the local time zone.
|
||||
TimeZone string `json:"time_zone"`
|
||||
|
||||
// Days of the week.
|
||||
|
||||
Sunday *dayConfigJSON `json:"sun,omitempty"`
|
||||
@@ -351,6 +348,9 @@ type weeklyConfigJSON struct {
|
||||
Thursday *dayConfigJSON `json:"thu,omitempty"`
|
||||
Friday *dayConfigJSON `json:"fri,omitempty"`
|
||||
Saturday *dayConfigJSON `json:"sat,omitempty"`
|
||||
|
||||
// TimeZone is the local time zone.
|
||||
TimeZone string `json:"time_zone"`
|
||||
}
|
||||
|
||||
// dayConfigJSON is the JSON configuration structure of dayRange.
|
||||
|
||||
@@ -163,10 +163,10 @@ yaml: "bad"
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
want *Weekly
|
||||
name string
|
||||
wantErrMsg string
|
||||
data []byte
|
||||
want *Weekly
|
||||
}{{
|
||||
name: "empty",
|
||||
wantErrMsg: "",
|
||||
@@ -228,9 +228,9 @@ func TestWeekly_MarshalYAML(t *testing.T) {
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
want *Weekly
|
||||
name string
|
||||
data []byte
|
||||
want *Weekly
|
||||
}{{
|
||||
name: "empty",
|
||||
data: []byte(""),
|
||||
@@ -263,8 +263,8 @@ func TestWeekly_MarshalYAML(t *testing.T) {
|
||||
func TestWeekly_Validate(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
in dayRange
|
||||
wantErrMsg string
|
||||
in dayRange
|
||||
}{{
|
||||
name: "empty",
|
||||
wantErrMsg: "",
|
||||
@@ -298,8 +298,8 @@ func TestWeekly_Validate(t *testing.T) {
|
||||
func TestDayRange_Validate(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
in dayRange
|
||||
wantErrMsg string
|
||||
in dayRange
|
||||
}{{
|
||||
name: "empty",
|
||||
wantErrMsg: "",
|
||||
@@ -413,10 +413,10 @@ func TestWeekly_UnmarshalJSON(t *testing.T) {
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
want *Weekly
|
||||
name string
|
||||
wantErrMsg string
|
||||
data []byte
|
||||
want *Weekly
|
||||
}{{
|
||||
name: "empty",
|
||||
wantErrMsg: "unexpected end of JSON input",
|
||||
@@ -478,9 +478,9 @@ func TestWeekly_MarshalJSON(t *testing.T) {
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
want *Weekly
|
||||
name string
|
||||
data []byte
|
||||
want *Weekly
|
||||
}{{
|
||||
name: "empty",
|
||||
data: []byte(""),
|
||||
|
||||
Reference in New Issue
Block a user