mirror of
https://github.com/outbackdingo/databunker.git
synced 2026-01-28 10:18:43 +00:00
fix formatting
This commit is contained in:
@@ -59,7 +59,7 @@ type Config struct {
|
||||
ForgetMe bool `yaml:"forget_me"`
|
||||
UserRecordChange bool `yaml:"user_record_change"`
|
||||
AppRecordChange []string `yaml:"app_record_change"`
|
||||
ConsentWithdraw []string `yaml:"consent_withdraw"`
|
||||
ConsentWithdraw []string `yaml:"consent_withdraw"`
|
||||
}
|
||||
Notification struct {
|
||||
ConsentNotificationURL string `yaml:"consent_notification_url"`
|
||||
|
||||
@@ -38,14 +38,14 @@ func Test_AppNames(t *testing.T) {
|
||||
|
||||
func Test_stringPatternMatch(t *testing.T) {
|
||||
goodJsons := []map[string]interface{}{
|
||||
{"pattern":"*","name": "tom", "result": true},
|
||||
{"pattern":"aa","name": "tom", "result": false},
|
||||
{"pattern":"","name":"aa","result": false},
|
||||
{"pattern":"test*","name":"123testabc", "result": false},
|
||||
{"pattern":"test*","name":"testabc", "result": true},
|
||||
{"pattern":"*test*","name":"test1", "result": true},
|
||||
{"pattern":"*test","name":"123testabc", "result": false},
|
||||
{"pattern":"*test","name":"123test", "result": true},
|
||||
{"pattern": "*", "name": "tom", "result": true},
|
||||
{"pattern": "aa", "name": "tom", "result": false},
|
||||
{"pattern": "", "name": "aa", "result": false},
|
||||
{"pattern": "test*", "name": "123testabc", "result": false},
|
||||
{"pattern": "test*", "name": "testabc", "result": true},
|
||||
{"pattern": "*test*", "name": "test1", "result": true},
|
||||
{"pattern": "*test", "name": "123testabc", "result": false},
|
||||
{"pattern": "*test", "name": "123test", "result": true},
|
||||
}
|
||||
for _, value := range goodJsons {
|
||||
if stringPatternMatch(value["pattern"].(string), value["name"].(string)) != value["result"].(bool) {
|
||||
|
||||
Reference in New Issue
Block a user