Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
14df3c62
Commit
14df3c62
authored
Mar 21, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cli): use built in envvar support
parent
7f8643ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
pkg/cmd/grafana-cli/main.go
+8
-10
No files found.
pkg/cmd/grafana-cli/main.go
View file @
14df3c62
...
...
@@ -12,10 +12,6 @@ import (
var
version
=
"master"
func
getGrafanaPluginPath
()
string
{
if
os
.
Getenv
(
"GF_PLUGIN_DIR"
)
!=
""
{
return
os
.
Getenv
(
"GF_PLUGIN_DIR"
)
}
os
:=
runtime
.
GOOS
if
os
==
"windows"
{
return
"C:
\\
opt
\\
grafana
\\
plugins"
...
...
@@ -34,14 +30,16 @@ func main() {
app
.
Version
=
version
app
.
Flags
=
[]
cli
.
Flag
{
cli
.
StringFlag
{
Name
:
"path"
,
Usage
:
"path to the grafana installation"
,
Value
:
getGrafanaPluginPath
(),
Name
:
"path"
,
Usage
:
"path to the grafana installation"
,
Value
:
getGrafanaPluginPath
(),
EnvVar
:
"GF_PLUGIN_DIR"
,
},
cli
.
StringFlag
{
Name
:
"repo"
,
Usage
:
"url to the plugin repository"
,
Value
:
"https://grafana-net.raintank.io/api/plugins"
,
Name
:
"repo"
,
Usage
:
"url to the plugin repository"
,
Value
:
"https://grafana-net.raintank.io/api/plugins"
,
EnvVar
:
"GF_PLUGIN_REPO"
,
},
cli
.
BoolFlag
{
Name
:
"debug, d"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment