Skip to content

Commit

Permalink
export packstate filename
Browse files Browse the repository at this point in the history
  • Loading branch information
nothub committed Apr 2, 2024
1 parent 8588c5a commit 5201ad9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions update/packstate/packstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/nothub/mrpack-install/modrinth/mrpack"
)

const file = "packstate.json"
const FileName = "packstate.json"

type Schema struct {
Slug string `json:"slug"`
Expand All @@ -35,7 +35,7 @@ func (state *Schema) Save(serverDir string) error {
return err
}

err = os.WriteFile(filepath.Join(serverDir, file), buf.Bytes(), 0644)
err = os.WriteFile(filepath.Join(serverDir, FileName), buf.Bytes(), 0644)
if err != nil {
return err
}
Expand All @@ -44,7 +44,7 @@ func (state *Schema) Save(serverDir string) error {
}

func LoadPackState(serverDir string) (*Schema, error) {
b, err := os.ReadFile(filepath.Join(serverDir, file))
b, err := os.ReadFile(filepath.Join(serverDir, FileName))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 5201ad9

Please sign in to comment.