command

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package command holds functionality for running puzzle solving command.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = errors.New("unauthorized")

ErrUnauthorized returns when session is empty or invalid.

Functions

func ContextWithOptions

func ContextWithOptions(ctx context.Context, opts ...puzzles.RunOption) context.Context

ContextWithOptions adds options to context.

func ContextWithSession

func ContextWithSession(ctx context.Context, session string) context.Context

ContextWithSession adds session to context.

func OptionsFromContext

func OptionsFromContext(ctx context.Context) []puzzles.RunOption

OptionsFromContext extracts options from context.

func Run

func Run(ctx context.Context, year, day string) (puzzles.Result, error)

Run runs puzzle solving for passed year/day date.

func SessionFromContext

func SessionFromContext(ctx context.Context) string

SessionFromContext extracts session from context.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL