added a ioutil for testing ci

This commit is contained in:
eleijonmarck 2022-08-12 14:36:12 +01:00
parent 3fc5c00e87
commit 8c324ccf8a
2 changed files with 6 additions and 1 deletions

View File

@ -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"]

View File

@ -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