From 08f774861676233d7ed99cf6e3ca865459c5c5dc Mon Sep 17 00:00:00 2001 From: Marcin Krolik Date: Wed, 7 Sep 2016 13:20:51 +0200 Subject: [PATCH] Error handling instead of panic, year corrected in license --- plugin/processor/snap-plugin-processor-passthru-grpc/main.go | 2 +- .../snap-plugin-processor-passthru-grpc/main_small_test.go | 2 +- .../snap-plugin-processor-passthru-grpc/passthru/passthru.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/processor/snap-plugin-processor-passthru-grpc/main.go b/plugin/processor/snap-plugin-processor-passthru-grpc/main.go index 7158a5db0..d69751653 100644 --- a/plugin/processor/snap-plugin-processor-passthru-grpc/main.go +++ b/plugin/processor/snap-plugin-processor-passthru-grpc/main.go @@ -2,7 +2,7 @@ http://www.apache.org/licenses/LICENSE-2.0.txt -Copyright 2015 Intel Corporation +Copyright 2016 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/processor/snap-plugin-processor-passthru-grpc/main_small_test.go b/plugin/processor/snap-plugin-processor-passthru-grpc/main_small_test.go index 3869f2e9c..045c93574 100644 --- a/plugin/processor/snap-plugin-processor-passthru-grpc/main_small_test.go +++ b/plugin/processor/snap-plugin-processor-passthru-grpc/main_small_test.go @@ -4,7 +4,7 @@ http://www.apache.org/licenses/LICENSE-2.0.txt -Copyright 2015 Intel Corporation +Copyright 2016 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/processor/snap-plugin-processor-passthru-grpc/passthru/passthru.go b/plugin/processor/snap-plugin-processor-passthru-grpc/passthru/passthru.go index e959b8e7f..c3c2a2aed 100644 --- a/plugin/processor/snap-plugin-processor-passthru-grpc/passthru/passthru.go +++ b/plugin/processor/snap-plugin-processor-passthru-grpc/passthru/passthru.go @@ -39,7 +39,7 @@ func (p *passthruProcessor) GetConfigPolicy() (plugin.ConfigPolicy, error) { policy := plugin.NewConfigPolicy() rule, err := plugin.NewBoolRule(debug, false) if err != nil { - panic(err) + return *policy, err } policy.AddBoolRule([]string{""}, rule) return *policy, nil