Skip to content

Commit

Permalink
refactor: remove ClassIdentifier type alias as it is unused
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjarosch committed Feb 26, 2024
1 parent 54c685e commit 90e98ed
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions class.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ type (
// SetHookFunc can be registered as either preSetHook or postSetHook
// and will then be called respectively.
SetHookFunc func(class Class, path data.Path, value data.Value) error
// ClassIdentifier is an identifier used to identify a Class
ClassIdentifier = data.Path
)

type DataGetter interface {
Expand Down Expand Up @@ -67,7 +65,7 @@ type Class struct {
// It is derived from the filename which this class represents.
Name string
// Identifier
Identifier ClassIdentifier
Identifier data.Path
// FilePath is the path to the underlying file on the filesystem.
FilePath string
// Access to the underlying container is usually not advised.
Expand All @@ -81,7 +79,7 @@ type Class struct {
// NewClass attempts to create a new class given a filesystem path and a codec.
// The class will only be created if the file is readable, can be decoded and
// adheres to the constraints set by [data.Container].
func NewClass(filePath string, codec Codec, identifier ClassIdentifier) (*Class, error) {
func NewClass(filePath string, codec Codec, identifier data.Path) (*Class, error) {
if len(filePath) == 0 {
return nil, ErrEmptyFilePath
}
Expand Down

0 comments on commit 90e98ed

Please sign in to comment.