Skip to content

Commit

Permalink
chore(build): updated environment of action and provided an example file
Browse files Browse the repository at this point in the history
  • Loading branch information
hvpaiva committed Aug 30, 2024
1 parent 8e86525 commit c8feb50
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ on:
jobs:

build:
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install xclip
run: sudo apt install xclip

- name: Set up Go
uses: actions/setup-go@v4
with:
Expand Down
22 changes: 22 additions & 0 deletions example/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package main

import (
"log"

"github.com/hvpaiva/goaoc"
)

func main() {
err := goaoc.Run("input", partOne, partTwo)
if err != nil {
log.Fatalf("error running Go AoC: %v", err)
}
}

func partOne(input string) int {
return len(input)
}

func partTwo(input string) int {
return len(input) * 2
}

0 comments on commit c8feb50

Please sign in to comment.