diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca874af..e056622 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,6 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} - goversion: "https://go.dev/dl/go1.23.12.linux-amd64.tar.gz" + goversion: "1.26" ldflags: -X "github.com/aadam-ali/second-brain-cli/config.version=${{ github.ref_name }}" binary_name: "sb" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 33eb9d0..46a5ee5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: '1.23.12' + go-version: '1.26' - name: Install dependencies run: go mod tidy diff --git a/cmd/link.go b/cmd/link.go index 7595635..9b46da6 100644 --- a/cmd/link.go +++ b/cmd/link.go @@ -25,11 +25,11 @@ func linkCmdFunction(cmd *cobra.Command, args []string) error { destTitle, _ := strings.CutSuffix(destFilename, ".md") if _, err := os.Stat(dest); err != nil { - return internal.GetError(err.Error()) + return internal.GetError("An error occurred: %s", err.Error()) } if _, err := os.Stat(src); err != nil { - return internal.GetError(err.Error()) + return internal.GetError("An error occurred: %s", err.Error()) } if useWikiLink, _ := cmd.Flags().GetBool("wiki"); useWikiLink { @@ -41,7 +41,7 @@ func linkCmdFunction(cmd *cobra.Command, args []string) error { relpath, err := filepath.Rel(filepath.Dir(src), dest) if err != nil { - return internal.GetError(err.Error()) + return internal.GetError("An error occurred: %s", err.Error()) } urlEncodedFilename := url.PathEscape(destFilename) diff --git a/go.mod b/go.mod index e466ae5..b138a4a 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/aadam-ali/second-brain-cli -go 1.23.12 +go 1.26 require ( - github.com/spf13/cobra v1.10.1 + github.com/spf13/cobra v1.10.2 github.com/stretchr/testify v1.11.1 ) @@ -11,6 +11,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/spf13/pflag v1.0.9 // indirect + github.com/spf13/pflag v1.0.10 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index d174bae..a4622f8 100644 --- a/go.sum +++ b/go.sum @@ -6,12 +6,14 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= -github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= -github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/mise.toml b/mise.toml index f5ea7af..620f6fb 100644 --- a/mise.toml +++ b/mise.toml @@ -1,5 +1,5 @@ [tools] -go = "1.23.12" +go = "1.26" pre-commit = "latest" [tasks.pre-commit-install]