From 05e6b5a84726b5f503fc186b080281258d7f92c4 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 7 Nov 2018 14:03:30 +0100 Subject: [PATCH] update common config interface --- internal/cnf/common.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/cnf/common.go b/internal/cnf/common.go index bf1b6b2..d754956 100644 --- a/internal/cnf/common.go +++ b/internal/cnf/common.go @@ -1,5 +1,9 @@ package cnf +import ( + "io" +) + // Field generic representation (root, branch or leaf) type Field struct { // Label of the current field @@ -12,6 +16,9 @@ type Field struct { // ConfigurationFormat is the common interface for all configuration parser type ConfigurationFormat interface { + // Parse the given file + Parse(io.Reader) error + // Get the value of a field if it exists Get(string) (string, bool)