Skip to content

Commit

Permalink
Configure version flag in command
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Jul 23, 2024
1 parent 4814174 commit 3fe7026
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/substreams-sink-noop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import (
"go.uber.org/zap"
)

// Version value, injected via go build `ldflags` at build time
var version = "dev"

var zlog, tracer = logging.ApplicationLogger("sink-noop", "github.com/streamingfast/substreams-sink-noop",
logging.WithConsoleToStderr(),
)
Expand All @@ -40,6 +43,7 @@ func main() {
substreams-sink-noop mainnet.eth.streamingfast.io:443 ethereum-network-v1-v0.1.0.spkg graph_out +1000
`),
ConfigureViper("SINK_NOOP"),
ConfigureVersion(version),
RangeArgs(3, 4),
Flags(func(flags *pflag.FlagSet) {
sink.AddFlagsToSet(flags, sink.FlagIgnore(sink.FlagIrreversibleOnly))
Expand Down

0 comments on commit 3fe7026

Please sign in to comment.