mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
remove unused variables detected by varcheck
This commit is contained in:
parent
4ddd15d921
commit
c1742df9ac
@ -3,12 +3,11 @@ package commands
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
m "github.com/grafana/grafana/pkg/cmd/grafana-cli/models"
|
|
||||||
services "github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
services "github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
var getPluginss func(path string) []m.InstalledPlugin = services.GetLocalPlugins
|
|
||||||
var removePlugin func(pluginPath, id string) error = services.RemoveInstalledPlugin
|
var removePlugin func(pluginPath, id string) error = services.RemoveInstalledPlugin
|
||||||
|
|
||||||
func removeCommand(c CommandLine) error {
|
func removeCommand(c CommandLine) error {
|
||||||
|
@ -33,7 +33,6 @@ import (
|
|||||||
var version = "5.0.0"
|
var version = "5.0.0"
|
||||||
var commit = "NA"
|
var commit = "NA"
|
||||||
var buildstamp string
|
var buildstamp string
|
||||||
var build_date string
|
|
||||||
|
|
||||||
var configFile = flag.String("config", "", "path to config file")
|
var configFile = flag.String("config", "", "path to config file")
|
||||||
var homePath = flag.String("homepath", "", "path to grafana install/home path, defaults to working directory")
|
var homePath = flag.String("homepath", "", "path to grafana install/home path, defaults to working directory")
|
||||||
|
@ -6,7 +6,6 @@ import (
|
|||||||
|
|
||||||
"github.com/grafana/grafana/pkg/bus"
|
"github.com/grafana/grafana/pkg/bus"
|
||||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||||
"github.com/grafana/grafana/pkg/log"
|
|
||||||
"github.com/grafana/grafana/pkg/models"
|
"github.com/grafana/grafana/pkg/models"
|
||||||
diff "github.com/yudai/gojsondiff"
|
diff "github.com/yudai/gojsondiff"
|
||||||
deltaFormatter "github.com/yudai/gojsondiff/formatter"
|
deltaFormatter "github.com/yudai/gojsondiff/formatter"
|
||||||
@ -15,11 +14,8 @@ import (
|
|||||||
var (
|
var (
|
||||||
// ErrUnsupportedDiffType occurs when an invalid diff type is used.
|
// ErrUnsupportedDiffType occurs when an invalid diff type is used.
|
||||||
ErrUnsupportedDiffType = errors.New("dashdiff: unsupported diff type")
|
ErrUnsupportedDiffType = errors.New("dashdiff: unsupported diff type")
|
||||||
|
|
||||||
// ErrNilDiff occurs when two compared interfaces are identical.
|
// ErrNilDiff occurs when two compared interfaces are identical.
|
||||||
ErrNilDiff = errors.New("dashdiff: diff is nil")
|
ErrNilDiff = errors.New("dashdiff: diff is nil")
|
||||||
|
|
||||||
diffLogger = log.New("dashdiffs")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type DiffType int
|
type DiffType int
|
||||||
|
@ -101,7 +101,3 @@ func sendWebRequestSync(ctx context.Context, webhook *Webhook) error {
|
|||||||
webhookLog.Debug("Webhook failed", "statuscode", resp.Status, "body", string(body))
|
webhookLog.Debug("Webhook failed", "statuscode", resp.Status, "body", string(body))
|
||||||
return fmt.Errorf("Webhook response status %v", resp.Status)
|
return fmt.Errorf("Webhook response status %v", resp.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
var addToWebhookQueue = func(msg *Webhook) {
|
|
||||||
webhookQueue <- msg
|
|
||||||
}
|
|
||||||
|
@ -12,7 +12,6 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
logger log.Logger = log.New("fake.log")
|
logger log.Logger = log.New("fake.log")
|
||||||
oneDatasourcesConfig string = ""
|
|
||||||
twoDatasourcesConfig string = "./test-configs/two-datasources"
|
twoDatasourcesConfig string = "./test-configs/two-datasources"
|
||||||
twoDatasourcesConfigPurgeOthers string = "./test-configs/insert-two-delete-two"
|
twoDatasourcesConfigPurgeOthers string = "./test-configs/insert-two-delete-two"
|
||||||
doubleDatasourcesConfig string = "./test-configs/double-default"
|
doubleDatasourcesConfig string = "./test-configs/double-default"
|
||||||
|
@ -8,11 +8,8 @@ import (
|
|||||||
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
|
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
|
||||||
|
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
//"github.com/grafana/grafana/pkg/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var indexTypes = []string{"Unknown", "INDEX", "UNIQUE INDEX"}
|
|
||||||
|
|
||||||
func TestMigrations(t *testing.T) {
|
func TestMigrations(t *testing.T) {
|
||||||
testDBs := []sqlutil.TestDB{
|
testDBs := []sqlutil.TestDB{
|
||||||
sqlutil.TestDB_Sqlite3,
|
sqlutil.TestDB_Sqlite3,
|
||||||
|
Loading…
Reference in New Issue
Block a user