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

Update Go version to 1.24.0 #58

Merged
merged 5 commits into from
Mar 4, 2025
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build Docker Image

# Defines environmental variables
env:
GO_VERSION: '1.23.4'
GO_LINTER_VERSION: 'v1.62.0'
GO_VERSION: '1.24.0'
GO_LINTER_VERSION: 'v1.64.6'

# Controls when the action will run
on:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/UCLALibrary/validation-service

go 1.23.6
go 1.24.0

require (
github.com/labstack/echo/v4 v4.13.3
Expand Down
17 changes: 9 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ package main
import (
"errors"
"fmt"
"github.com/UCLALibrary/validation-service/api"
"github.com/UCLALibrary/validation-service/validation"
"github.com/UCLALibrary/validation-service/validation/config"
"github.com/UCLALibrary/validation-service/validation/utils"
"github.com/labstack/echo/v4"
middleware "github.com/oapi-codegen/echo-middleware"
"go.uber.org/zap"
"html/template"
"io"
"log"
"net/http"
"os"
"path/filepath"
"sync"

"github.com/UCLALibrary/validation-service/api"
"github.com/UCLALibrary/validation-service/validation"
"github.com/UCLALibrary/validation-service/validation/config"
"github.com/UCLALibrary/validation-service/validation/utils"
"github.com/labstack/echo/v4"
middleware "github.com/oapi-codegen/echo-middleware"
"go.uber.org/zap"
)

// Port is the default port for our server
Expand Down Expand Up @@ -274,7 +275,7 @@ func routerConfigMiddleware(echoApp *echo.Echo, engine *validation.Engine, route
// We return the oapi-codegen middleware that handles our OpenAPI defined routes
return middleware.OapiRequestValidatorWithOptions(swagger, &middleware.Options{
Skipper: func(aContext echo.Context) bool {
for index, _ := range routes {
for index := range routes {
// We ignore paths that we've already configured through static or template handlers
if aContext.Path() == routes[index].RoutePath {
return true
Expand Down
5 changes: 3 additions & 2 deletions validation/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ package validation

import (
"fmt"
"os"

"github.com/UCLALibrary/validation-service/validation/config"
csv "github.com/UCLALibrary/validation-service/validation/utils"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"os"
)

// Engine performs the CSV file validations.
Expand Down Expand Up @@ -129,7 +130,7 @@ func (engine *Engine) Validate(profile string, csvData [][]string) error {
// Have each validator check each cell in the supplied csvData
for _, validator := range validators {
for rowIndex, row := range csvData {
for colIndex, _ := range row {
for colIndex := range row {
// Validate the data cell we're on, passing the entire CSV data matrix for additional context
err := validator.Validate(profile, csv.Location{RowIndex: rowIndex, ColIndex: colIndex}, csvData)
if err != nil {
Expand Down
Loading