v1.2.1

Removed APIs

Last updated

This page lists exported identifiers that no longer exist, the version that removed them, and what to use instead.

Root Package Moved to core

v1.2.1 moved the scheduler from the module root (package goCron) to github.com/pardnchiu/go-scheduler/core (package core). Every identifier below still exists under core with the same signature, except List.

Symbol Package Removed Last available Replacement
New module root Removed in v1.2.1 v1.2.0 core.New
Config module root Removed in v1.2.1 v1.2.0 core.Config
Wait module root Removed in v1.2.1 v1.2.0 core.Wait
WaitState module root Removed in v1.2.1 v1.2.0 core.WaitState
Stop, Skip constants module root Removed in v1.2.1 v1.2.0 core.Stop, core.Skip
TaskPending, TaskRunning, TaskCompleted, TaskFailed module root Removed in v1.2.1 v1.2.0 core.TaskPending and siblings
Start method module root Removed in v1.2.1 v1.2.0 Start on the value returned by core.New
Stop method module root Removed in v1.2.1 v1.2.0 Stop on the value returned by core.New
Add method module root Removed in v1.2.1 v1.2.0 Add on the value returned by core.New
Remove method module root Removed in v1.2.1 v1.2.0 Remove on the value returned by core.New
RemoveAll method module root Removed in v1.2.1 v1.2.0 RemoveAll on the value returned by core.New
List method returning []task module root Removed in v1.2.1 v1.2.0 List on the value returned by core.New, now returning []*task
Len, Less, Swap, Push, Pop on taskHeap module root Removed in v1.2.1 v1.2.0 No public replacement; internal container/heap implementation
// before v1.2.1
import cron "github.com/pardnchiu/go-scheduler"

scheduler, err := cron.New(cron.Config{Location: time.Local})

// v1.2.1 and later
import "github.com/pardnchiu/go-scheduler/core"

scheduler, err := core.New(core.Config{Location: time.Local})

Custom Logger

Symbol Package Removed Last available Replacement
Log type (alias of go-logger Log) module root Removed in v0.3.1 v0.3.0 No public replacement; logging uses log/slog internally
Logger type (alias of go-logger Logger) module root Removed in v0.3.1 v0.3.0 No public replacement
Config.Log field module root Removed in v0.3.1 v0.3.0 No public replacement; see Configuration for the fixed logger

See Released for the full changelog of each version.

中文