Added greater granularity for boolean environment variables (#511)

* Added greater granularity for boolean environment variables

* Improved solution as reviewed
This commit is contained in:
Alessandro Detta
2024-02-22 11:35:53 +01:00
committed by GitHub
parent 3d7f907a33
commit b5bed10571
7 changed files with 73 additions and 11 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"github.com/joomcode/errorx"
"os"
"os/signal"
"strings"
@@ -12,7 +11,9 @@ import (
"github.com/gin-gonic/gin"
"github.com/jessevdk/go-flags"
"github.com/joomcode/errorx"
"github.com/komodorio/helm-dashboard/pkg/dashboard"
"github.com/komodorio/helm-dashboard/pkg/dashboard/utils"
"github.com/pkg/browser"
log "github.com/sirupsen/logrus"
)
@@ -50,7 +51,7 @@ func main() {
opts.BindHost = host
}
opts.Verbose = opts.Verbose || os.Getenv("DEBUG") != ""
opts.Verbose = opts.Verbose || utils.EnvAsBool("DEBUG", false)
setupLogging(opts.Verbose)
server := dashboard.Server{