kiwimix/pkg/stackops/load.go

17 lines
393 B
Go
Raw Normal View History

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