aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/go.yml16
-rw-r--r--config.go4
-rw-r--r--templates/templates.go2
3 files changed, 9 insertions, 13 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index a038ee5..a8c53f6 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -13,21 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: Setup Go
- uses: actions/setup-go@v2
- with:
- go-version: 1.18.x
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- - name: Load cached dependencies
- uses: actions/cache@v1
+ - name: Setup Go
+ uses: actions/setup-go@v3
with:
- path: ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
+ go-version: 1.19.x
+ cache: true
- name: Lint
run: make lint
diff --git a/config.go b/config.go
index e322da3..2588f39 100644
--- a/config.go
+++ b/config.go
@@ -2,7 +2,7 @@ package main
import (
"fmt"
- "io/ioutil"
+ "os"
"sort"
"strings"
@@ -55,7 +55,7 @@ func ensureAlphabetical(data []byte) bool {
func Parse(path string) (*Config, error) {
var c Config
- data, err := ioutil.ReadFile(path)
+ data, err := os.ReadFile(path)
if err != nil {
return nil, err
}
diff --git a/templates/templates.go b/templates/templates.go
index 644eb3b..7f90908 100644
--- a/templates/templates.go
+++ b/templates/templates.go
@@ -3,9 +3,11 @@ package templates
import _ "embed" // needed for go:embed
// Index holds the contents of the index.html template.
+//
//go:embed index.html
var Index string
// Package holds the contents of the package.html template.
+//
//go:embed package.html
var Package string