Skip to content
Snippets Groups Projects
Commit b5e632f6 authored by Xiang Dai's avatar Xiang Dai Committed by Ed
Browse files

Remove useless func (#472)


Remove useless func

No one called this func, keep it only mislead.

Signed-off-by: default avatarXiang Dai <764524258@qq.com>
parent 638c25f0
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,8 @@ package config
import (
"flag"
"io/ioutil"
"path/filepath"
"github.com/weaveworks/common/server"
"gopkg.in/yaml.v2"
"github.com/grafana/loki/pkg/promtail/client"
"github.com/grafana/loki/pkg/promtail/positions"
......@@ -30,18 +27,3 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) {
c.PositionsConfig.RegisterFlags(f)
c.TargetConfig.RegisterFlags(f)
}
// LoadConfig loads config from a file.
func LoadConfig(filename string) (*Config, error) {
buf, err := ioutil.ReadFile(filepath.Clean(filename))
if err != nil {
return nil, err
}
var cfg Config
if err := yaml.UnmarshalStrict(buf, &cfg); err != nil {
return nil, err
}
return &cfg, nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment