mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove unused Go code (#28852)
* Chore: Remove more unused Go code Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -75,14 +74,10 @@ var (
|
||||
PluginsPath string
|
||||
CustomInitPath = "conf/custom.ini"
|
||||
|
||||
// Log settings.
|
||||
LogConfigs []util.DynMap
|
||||
|
||||
// HTTP server options
|
||||
Protocol Scheme
|
||||
Domain string
|
||||
HttpAddr, HttpPort string
|
||||
SshPort int
|
||||
CertFile, KeyFile string
|
||||
SocketPath string
|
||||
RouterLogging bool
|
||||
@@ -168,13 +163,8 @@ var (
|
||||
// Basic Auth
|
||||
BasicAuthEnabled bool
|
||||
|
||||
// Session settings.
|
||||
SessionConnMaxLifetime int64
|
||||
|
||||
// Global setting objects.
|
||||
Raw *ini.File
|
||||
ConfRootPath string
|
||||
IsWindows bool
|
||||
Raw *ini.File
|
||||
|
||||
// for logging purposes
|
||||
configFiles []string
|
||||
@@ -214,11 +204,6 @@ var (
|
||||
// Grafana.NET URL
|
||||
GrafanaComUrl string
|
||||
|
||||
// S3 temp image store
|
||||
S3TempImageStoreBucketUrl string
|
||||
S3TempImageStoreAccessKey string
|
||||
S3TempImageStoreSecretKey string
|
||||
|
||||
ImageUploadProvider string
|
||||
)
|
||||
|
||||
@@ -342,10 +327,6 @@ func (cfg Cfg) IsNgAlertEnabled() bool {
|
||||
return cfg.FeatureToggles["ngalert"]
|
||||
}
|
||||
|
||||
func (cfg Cfg) IsDatabaseMetricsEnabled() bool {
|
||||
return cfg.FeatureToggles["database_metrics"]
|
||||
}
|
||||
|
||||
func (cfg Cfg) IsHTTPRequestHistogramEnabled() bool {
|
||||
return cfg.FeatureToggles["http_request_histogram"]
|
||||
}
|
||||
@@ -356,10 +337,6 @@ type CommandLineArgs struct {
|
||||
Args []string
|
||||
}
|
||||
|
||||
func init() {
|
||||
IsWindows = runtime.GOOS == "windows"
|
||||
}
|
||||
|
||||
func parseAppUrlAndSubUrl(section *ini.Section) (string, string, error) {
|
||||
appUrl := valueAsString(section, "root_url", "http://localhost:3000/")
|
||||
|
||||
|
||||
@@ -32,10 +32,6 @@ func (q *UserQuota) ToMap() map[string]int64 {
|
||||
return quotaToMap(*q)
|
||||
}
|
||||
|
||||
func (q *GlobalQuota) ToMap() map[string]int64 {
|
||||
return quotaToMap(*q)
|
||||
}
|
||||
|
||||
func quotaToMap(q interface{}) map[string]int64 {
|
||||
qMap := make(map[string]int64)
|
||||
typ := reflect.TypeOf(q)
|
||||
|
||||
Reference in New Issue
Block a user