Skip to content

Commit

Permalink
Increment version
Browse files Browse the repository at this point in the history
  • Loading branch information
DaltonSW committed Oct 5, 2024
1 parent cf73b4e commit 1ad3ae3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmd/aocli/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

// Internally tracked version to compare against GitHub releases
const currentVersion = "v0.9.9"
const currentVersion = "v0.9.10"
const repoURL = "https://api.github.com/repos/DaltonSW/aocGo/releases/latest"

const updateMessage = "\nNew version available! Run `aocli update` to get the new version (or `sudo aocli update` if your executable is in a protected location)"
Expand Down
13 changes: 3 additions & 10 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"golang.org/x/time/rate"
)

// USER_AGENT is used to identify requests from this program
const USER_AGENT = "go.dalton.dog/aocgo"
const BASE_URL = "https://adventofcode.com"
const YEAR_URL = BASE_URL + "/%v"
Expand Down Expand Up @@ -83,7 +84,7 @@ func NewGetReq(url string, sessionToken string) (*http.Response, error) {

// SubmitAnswer will submit an answer to a puzzle on behalf of a given user token.
func SubmitAnswer(year int, day int, part int, userSession string, answer string) (*http.Response, error) {
URL := PuzzleAnswerURL(year, day)
URL := puzzleAnswerURL(year, day)
log.Debugf("Attempting to submit answer for Day %v (%v) [Part %v] to URL %v", day, year, part, URL)
log.Debugf("Answer: %v -- User: %v", answer, userSession)

Expand All @@ -107,14 +108,6 @@ func SubmitAnswer(year int, day int, part int, userSession string, answer string

// URL Helper Methods

func PuzzlePageURL(year int, day int) string {
return fmt.Sprintf(DAY_URL, year, day)
}

func PuzzleInputURL(year int, day int) string {
return fmt.Sprintf(DAY_URL, year, day) + "/input"
}

func PuzzleAnswerURL(year int, day int) string {
func puzzleAnswerURL(year int, day int) string {
return fmt.Sprintf(DAY_URL, year, day) + "/answer"
}

0 comments on commit 1ad3ae3

Please sign in to comment.