Skip to content

Commit

Permalink
use mehskit's encoding package
Browse files Browse the repository at this point in the history
Signed-off-by: MUzairS15 <muzair.shaikh810@gmail.com>
  • Loading branch information
MUzairS15 committed Aug 14, 2024
1 parent 898b760 commit bc379ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/patterns/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package patterns

import (
"github.com/Masterminds/semver/v3"
"github.com/layer5io/meshkit/encoding"
"github.com/layer5io/meshkit/utils"
"github.com/meshery/schemas/models/v1beta1/pattern"
"gopkg.in/yaml.v2"
)

func GetNextVersion(p *pattern.PatternFile) (string, error) {
Expand All @@ -29,7 +29,7 @@ func AssignVersion(p *pattern.PatternFile) {
}
func GetPatternFormat(patternFile string) (*pattern.PatternFile, error) {
pattern := pattern.PatternFile{}
err := yaml.Unmarshal([]byte(patternFile), &pattern)
err := encoding.Unmarshal([]byte(patternFile), &pattern)
if err != nil {
err = utils.ErrDecodeYaml(err)
return nil, err
Expand Down

0 comments on commit bc379ff

Please sign in to comment.