kiwimix/pkg/stackops/load.go

16 lines
393 B
Go

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
if err != nil {
return err
}
stack.Push(cal)
return nil
}