Skip to content

Commit

Permalink
refactor: use any instead of an empty interface
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Sep 14, 2023
1 parent 3a1c0a1 commit de195c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/reporter/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (r *Reporter) PrintResult(result Result) {
// stdout as JSON.
func (r *Reporter) PrintJSONResults() {
out, err := json.Marshal(struct {
Results interface{} `json:"results"`
Results any `json:"results"`
}{Results: r.results})

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/lockfile/parse-pnpm-lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type pnpmLockfileV6 struct {
Packages map[string]PnpmLockPackage `yaml:"packages,omitempty"`
}

func (l *PnpmLockfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
func (l *PnpmLockfile) UnmarshalYAML(unmarshal func(any) error) error {
var lockfileV6 pnpmLockfileV6

if err := unmarshal(&lockfileV6); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/lockfile/parse-pubspec-lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type PubspecLockDescription struct {

var _ yaml.Unmarshaler = &PubspecLockDescription{}

func (pld *PubspecLockDescription) UnmarshalYAML(unmarshal func(interface{}) error) error {
func (pld *PubspecLockDescription) UnmarshalYAML(unmarshal func(any) error) error {
var m struct {
Name string `yaml:"name"`
URL string `yaml:"url"`
Expand Down

0 comments on commit de195c0

Please sign in to comment.