Skip to content

Commit

Permalink
Fix deprecation and import path
Browse files Browse the repository at this point in the history
  • Loading branch information
deniszh committed Aug 20, 2024
1 parent 135540f commit 7d330d9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkg/conf/clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"io"

"github.com/burntsushi/toml"
"github.com/BurntSushi/toml"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -59,7 +59,7 @@ type Host struct {
// ReadClustersConfig reads clusters set from a reader.
func ReadClustersConfig(r io.Reader) (Clusters, error) {
var cls Clusters
_, err := toml.DecodeReader(r, &cls)
_, err := toml.NewDecoder(r).Decode(&cls)
if err != nil {
return cls, errors.Wrap(err, "error while decoding")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"path/filepath"

"github.com/burntsushi/toml"
"github.com/BurntSushi/toml"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -179,7 +179,7 @@ type Main struct {
func ReadMain(r io.Reader) (Main, error) {
cfg := MakeDefault()

_, err := toml.DecodeReader(r, &cfg)
_, err := toml.NewDecoder(r).Decode(&cfg)
if err != nil {
return cfg, errors.Wrap(err, "parsing error")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/conf/rewrites.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"

"github.com/burntsushi/toml"
"github.com/BurntSushi/toml"
"github.com/pkg/errors"
)

Expand All @@ -24,7 +24,7 @@ type Rewrite struct {
func ReadRewrites(r io.Reader) (Rewrites, error) {
var rewrites Rewrites

_, err := toml.DecodeReader(r, &rewrites)
_, err := toml.NewDecoder(r).Decode(&rewrites)
if err != nil {
return rewrites, errors.Wrap(err, "error parsing rewrites")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/conf/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io"

"github.com/burntsushi/toml"
"github.com/BurntSushi/toml"
"github.com/pkg/errors"
)

Expand All @@ -24,7 +24,7 @@ type Rule struct {
// ReadRules reads rules from the reader. Errors when parsing fails.
func ReadRules(r io.Reader) (Rules, error) {
var rs Rules
_, err := toml.DecodeReader(r, &rs)
_, err := toml.NewDecoder(r).Decode(&rs)
if err != nil {
return rs, errors.Wrap(err, "error parsing rules")
}
Expand Down

0 comments on commit 7d330d9

Please sign in to comment.