changing pkg() to install()

This commit is contained in:
2025-10-31 18:04:25 -03:00
parent d3c4a604c3
commit 43a24a4f36
3 changed files with 8 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ type PacketLua struct {
GlobalDependencies *PkgDependencies
Build *lua.LFunction
Pkg *lua.LFunction
Install *lua.LFunction
}
type Source struct {
@@ -122,11 +122,11 @@ func ReadPacket(f []byte, cfg *Config) (PacketLua, error) {
GlobalSources: getSourcesFromTable(pkgTable, "sources"),
Build: getFunctionFromTable(table, "build"),
Pkg: getFunctionFromTable(table, "pkg"),
Install: getFunctionFromTable(table, "install"),
}
if packetLua.Pkg == nil {
return PacketLua{}, fmt.Errorf("pkg() does not exist")
if packetLua.Install == nil {
return PacketLua{}, fmt.Errorf("install() does not exist")
}
return *packetLua, nil

View File

@@ -54,7 +54,7 @@ return {
build = function()
end,
pkg = function() -- required
install = function() -- required
print("oi amores")
end,

View File

@@ -35,7 +35,7 @@ return {
end,
pkg = function() -- required
install = function() -- required
print("goku")
end,