Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump go toolchain to 1.23.3 #147

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

NAME ?= auger
PKG ?= github.com/etcd-io/$(NAME)
GO_VERSION ?= 1.23.2
GO_VERSION ?= 1.23.3
GOOS ?= linux
GOARCH ?= amd64
TEMP_DIR := $(shell mktemp -d)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/etcd-io/auger

go 1.23

toolchain go1.23.2
toolchain go1.23.3

require (
github.com/google/safetext v0.0.0-20220914124124-e18e3fe012bf
Expand Down
9 changes: 9 additions & 0 deletions pkg/data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"encoding/json"
"fmt"
"hash/crc32"
"os"
"sort"
"strings"
"text/template"
Expand Down Expand Up @@ -151,7 +152,15 @@ type Checksum struct {
CompactRevision int64
}

// boltOpen checks if the file exists and opens it in read-only mode.
// Returns an error if the file does not exist.
func boltOpen(path string) (*bolt.DB, error) {
// Check if the file exists
if _, err := os.Stat(path); os.IsNotExist(err) {
return nil, fmt.Errorf("file does not exist: %s", path)
}

// Open the file in read-only mode
return bolt.Open(path, 0400, &bolt.Options{
ReadOnly: true,
})
Expand Down