Files
ExpSplitter/src/cmd/scripts.go
T
esilva 7320b61df7 Working on the Calculated thing
Did some work towards the lua interface, but its kinda shit tbh
2025-08-26 19:29:33 +01:00

30 lines
439 B
Go

package cmd
import (
exp "expenses/expenses"
"log"
"github.com/spf13/cobra"
)
func scripts(cmd *cobra.Command, args []string) {
lua := exp.Serv.Lua
if err := lua.DoFile("./lua-scripts/test.lua"); err != nil {
log.Printf("Failed to run lua script: %+v", err)
}
}
// shelf
var scriptsCmd = &cobra.Command{
Use: "debts",
Short: "",
Long: ``,
Args: nil,
Run: scripts,
}
func init() {
rootCmd.AddCommand(scriptsCmd)
}