Skip to content

Commit

Permalink
unexport toYaml func
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar committed Oct 22, 2024
1 parent 6e67f12 commit 86ff988
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/loadbalancer/cilium/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (cfg *ciliumConfig) addIPToPool(network string, ip models.V1IPResponse) err
return nil
}

func (cfg *ciliumConfig) ToYAML() (string, error) {
func (cfg *ciliumConfig) toYAML() (string, error) {
bb, err := yaml.Marshal(cfg)
if err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/loadbalancer/cilium/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func TestCiliumConfig_CalculateConfig(t *testing.T) {
return
}

yaml, err := cfg.ToYAML()
yaml, err := cfg.toYAML()
require.NoError(t, err)

if diff := cmp.Diff(yaml, mustYAML(tt.want)); diff != "" {
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/loadbalancer/metallb/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ func (cfg *metalLBConfig) addIPToPool(network string, ip models.V1IPResponse) er
return nil
}

// ToYAML returns this config in YAML format.
func (cfg *metalLBConfig) ToYAML() (string, error) {
// toYAML returns this config in YAML format.
func (cfg *metalLBConfig) toYAML() (string, error) {
bb, err := yaml.Marshal(cfg)
if err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/loadbalancer/metallb/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func TestMetalLBConfig_CalculateConfig(t *testing.T) {
return
}

yaml, err := cfg.ToYAML()
yaml, err := cfg.toYAML()
require.NoError(t, err)

if diff := cmp.Diff(yaml, mustYAML(tt.want)); diff != "" {
Expand Down

0 comments on commit 86ff988

Please sign in to comment.