From 057c2fdbfaf1556042036c6bdbe2edebe0e2ef61 Mon Sep 17 00:00:00 2001 From: Yuli Date: Sat, 1 Feb 2020 23:17:42 +0200 Subject: [PATCH] fix formatting --- src/bunker.go | 2 +- src/utils_test.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bunker.go b/src/bunker.go index 33028d8..2edde50 100644 --- a/src/bunker.go +++ b/src/bunker.go @@ -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"` diff --git a/src/utils_test.go b/src/utils_test.go index 173d0ed..70a32f4 100644 --- a/src/utils_test.go +++ b/src/utils_test.go @@ -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) {