Skip to content

Commit

Permalink
chore: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemain committed Mar 8, 2024
1 parent 4984ff0 commit 37a961c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ type AvailableHookResultItem struct {
Addition []*Info `luai:"addition"`
}

type AvailableHookResult = []*AvailableHookResultItem

type PreInstallHookCtx struct {
Version string `luai:"version"`
RuntimeVersion string `luai:"runtimeVersion"`
Expand Down
2 changes: 1 addition & 1 deletion internal/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (l *LuaPlugin) Available() ([]*Package, error) {
return []*Package{}, nil
}

hookResult := []AvailableHookResultItem{}
hookResult := AvailableHookResult{}
err = luai.Unmarshal(table, &hookResult)
if err != nil {
return nil, errors.New("failed to unmarshal the return value: " + err.Error())
Expand Down

0 comments on commit 37a961c

Please sign in to comment.