aoc

package
v0.0.0-...-fe5d575 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RequestTimout = 10

Variables

This section is empty.

Functions

func AssertEqual

func AssertEqual(expected, actual int)

func GetDayInput

func GetDayInput(embedInput embed.FS) []string

func GetDayInputFile

func GetDayInputFile(embedInput embed.FS, filename string) []string

func RunPart

func RunPart(name string, input []string, part InputFunc)

func RunSolution

func RunSolution(input []string, partOne InputFunc, partTwo InputFunc)

func RunTime

func RunTime(startTime time.Time) string

func Seq

func Seq(x, y int) []int

func ToInt

func ToInt(s string) int

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string) Client

func (*Client) DownloadAndSaveInput

func (c *Client) DownloadAndSaveInput(year, day int, targetFile string) error

DownloadAndSaveInput downloads and saves the requested input file.

func (*Client) DownloadInput

func (c *Client) DownloadInput(year, day int) (io.ReadCloser, error)

DownloadInput downloads the requested input file.

type InputFunc

type InputFunc func([]string) int

Jump to

Keyboard shortcuts

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