We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4acee1d + 790560f commit 41d22ecCopy full SHA for 41d22ec
main.go
@@ -2,6 +2,8 @@ package main
2
3
import (
4
"context"
5
+ "flag"
6
+ "fmt"
7
"log"
8
"log/slog"
9
"os"
@@ -15,9 +17,18 @@ import (
15
17
"github.com/infracost/lsp/internal/plugins/parser"
16
18
"github.com/infracost/lsp/internal/plugins/providers"
19
"github.com/infracost/lsp/internal/scanner"
20
+ "github.com/infracost/lsp/version"
21
)
22
23
func main() {
24
+ showVersion := flag.Bool("version", false, "print the version and exit")
25
+ flag.Parse()
26
+
27
+ if *showVersion {
28
+ fmt.Println(version.Version)
29
+ os.Exit(0)
30
+ }
31
32
cfg := config.Load(context.Background())
33
34
slog.SetDefault(slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
0 commit comments