mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
added a ioutil for testing ci
This commit is contained in:
parent
3fc5c00e87
commit
8c324ccf8a
@ -18,7 +18,7 @@ list-type = "blacklist"
|
|||||||
include-go-root = true
|
include-go-root = true
|
||||||
packages = ["io/ioutil"]
|
packages = ["io/ioutil"]
|
||||||
[[linters-settings.depguard.packages-with-error-message]]
|
[[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]
|
[linters-settings.gocritic]
|
||||||
enabled-checks = ["ruleguard"]
|
enabled-checks = ["ruleguard"]
|
||||||
|
@ -2,6 +2,7 @@ package auth
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/models"
|
"github.com/grafana/grafana/pkg/models"
|
||||||
)
|
)
|
||||||
@ -23,6 +24,10 @@ type userAuthToken struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func userAuthTokenFromUserToken(ut *models.UserToken) (*userAuthToken, error) {
|
func userAuthTokenFromUserToken(ut *models.UserToken) (*userAuthToken, error) {
|
||||||
|
_, fileErr := ioutil.ReadDir("dir")
|
||||||
|
if fileErr != nil {
|
||||||
|
fmt.Printf("inside")
|
||||||
|
}
|
||||||
var uat userAuthToken
|
var uat userAuthToken
|
||||||
err := uat.fromUserToken(ut)
|
err := uat.fromUserToken(ut)
|
||||||
return &uat, err
|
return &uat, err
|
||||||
|
Loading…
Reference in New Issue
Block a user