Skip to content

Releases: marcos-venicius/aocreader

Release list

V4

Choose a tag to compare

@marcos-venicius marcos-venicius released this 01 Dec 17:50

Full Changelog: v3...v4

Bugs

  • Fix mock reader array range

V3

V3

Choose a tag to compare

@marcos-venicius marcos-venicius released this 01 Dec 00:20

AocReader

This lib is a helper to my aoc solutions.

Mocking

This method allows you to pass an array as the lines of a file

import "github.com/marcos-venicius/aocreader"

lines := []string{
  "line 1",
  "...",
}

reader := aocreader.NewMockReader(lines)

for reader.Running() {
    i, line := reader.Line()

    ...
}

Using

This method allows you to pass the path to a file where you want to read the lines

import "github.com/marcos-venicius/aocreader"

reader := aocreader.NewAocReader("./input.txt")

for reader.Running() {
    i, line := reader.Line()

    ...
}

Full Changelog: v2...v3

V1

V1

Choose a tag to compare

@marcos-venicius marcos-venicius released this 06 Sep 11:55

AocReader

This lib is a helper to my aoc solutions.

Mocking

This method allows you to pass an array as the lines of a file

import "github.com/marcos-venicius/aocreader"

lines := []string{
  "line 1",
  "...",
}

reader := aocreader.NewMockReader(lines)

reader.Read(...)

Using

This method allows you to pass the path to a file where you want to read the lines

import "github.com/marcos-venicius/aocreader"

reader := aocreader.NewAocReader("./input.txt")

reader.Read(...)

Full Changelog: https://github.com/marcos-venicius/aocreader/commits/v1