utilities

package
v0.0.0-...-c4bc27c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMainPuzzleSolution

func CheckMainPuzzleSolution(t *testing.T, expect1, expect2 int)

CheckMainPuzzleSolution can be used to test that a main program generates the correct puzzle output.

func MergeGapsBetweenLines

func MergeGapsBetweenLines(bricks []string, mortar string) []string

MergeGapsBetweenLines takes a slice of lines (bricks) and shall merge lines together with the mortar, breaking upon a blank line.

func ReadIntegersFromFile

func ReadIntegersFromFile(filename string) ([]int, error)

ReadIntegersFromFile reads a file and attempts to parse each line as an integer, returning the resultant slice of integers.

func ReadLinesFromFile

func ReadLinesFromFile(filename string) ([]string, error)

ReadLinesFromFile reads the entire file specified, and returns a slice of strings

func SliceStringsToInts

func SliceStringsToInts(numStrs []string) ([]int, error)

SliceStringsToInts takes a slice of strings and attempts to convert to a slice of integers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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