config: minor changes to split config and watcher files

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-08-04 15:06:43 +03:00
parent ee09f57192
commit 5ef2eb7f39
3 changed files with 10 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"errors"
"flag"
"fmt"
"reflect"
"time"
@@ -120,6 +121,10 @@ func (c *flagConfig) Name() string {
return c.opts.Name
}
func (c *flagConfig) Watch(ctx context.Context, opts ...config.WatchOption) (config.Watcher, error) {
return nil, fmt.Errorf("not implemented")
}
func NewConfig(opts ...config.Option) config.Config {
options := config.NewOptions(opts...)
if len(options.StructTag) == 0 {