From 8c324ccf8a48b4c89d8301933f60886f8eaecba3 Mon Sep 17 00:00:00 2001 From: eleijonmarck Date: Fri, 12 Aug 2022 14:36:12 +0100 Subject: [PATCH] added a ioutil for testing ci --- conf/.golangci.toml | 2 +- pkg/services/auth/model.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/.golangci.toml b/conf/.golangci.toml index ac72b80b036..857c978d842 100644 --- a/conf/.golangci.toml +++ b/conf/.golangci.toml @@ -18,7 +18,7 @@ list-type = "blacklist" include-go-root = true packages = ["io/ioutil"] [[linters-settings.depguard.packages-with-error-message]] - "io/ioutil" = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details." +"io/ioutil" = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details." [linters-settings.gocritic] enabled-checks = ["ruleguard"] diff --git a/pkg/services/auth/model.go b/pkg/services/auth/model.go index 799b3e68b16..2e42308243f 100644 --- a/pkg/services/auth/model.go +++ b/pkg/services/auth/model.go @@ -2,6 +2,7 @@ package auth import ( "fmt" + "io/ioutil" "github.com/grafana/grafana/pkg/models" ) @@ -23,6 +24,10 @@ type userAuthToken struct { } func userAuthTokenFromUserToken(ut *models.UserToken) (*userAuthToken, error) { + _, fileErr := ioutil.ReadDir("dir") + if fileErr != nil { + fmt.Printf("inside") + } var uat userAuthToken err := uat.fromUserToken(ut) return &uat, err