kiwimix/pkg/stackops/load.go
2023-06-20 23:44:50 +02:00

16 lines
396 B
Go

package stackops
import (
basetypes "code.apps.glenux.net/glenux/kiwimix/pkg/basetypes"
)
type LoadOperation struct{}
func (op *LoadOperation) Execute(stack *basetypes.CalendarStack, filePath string) error {
cal, err := basetypes.ParseICSFile(filePath) // hypothetically, ParseICSFile parses an ICS file into a Calendar object
if err != nil {
return err
}
stack.Push(cal)
return nil
}