Skip to content

Commit

Permalink
fix(deps): upgrade to yaml.v3
Browse files Browse the repository at this point in the history
  • Loading branch information
depado committed Feb 2, 2023
1 parent 9ad9104 commit a0877d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
yaml "gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v3"

"github.com/Depado/smallblog/models"
)
Expand All @@ -19,7 +19,7 @@ import (
func AddNewCommand(c *cobra.Command) error {
var err error

var helpmsg = `Generate a new article. The first argument is the filename of the
var helpmsg = `Generate a new article. The first argument is the filename of the
article created and should not exist in the configured pages directory. If the
title isn't provided with the appropriate --title flag, it should be added by
hand in the generated file.`
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.15.0
github.com/stvp/slug v0.0.0-20150928221549-5ab8191bb1fe
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)

require (
Expand Down Expand Up @@ -50,5 +50,5 @@ require (
golang.org/x/text v0.6.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
2 changes: 1 addition & 1 deletion models/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type MetaData struct {
Draft bool `yaml:"draft"`
}

// Validate validates that the metada is valid
// Validate validates that the metadata is valid
func (m *MetaData) Validate() error {
if m.Date == "" {
return fmt.Errorf("parser: The `date` field is mandatory")
Expand Down
2 changes: 1 addition & 1 deletion models/pages.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)

// MPages is the map containing all the articles. The key is the slug of the article
Expand Down

0 comments on commit a0877d4

Please sign in to comment.