Skip to content

Commit

Permalink
counter: add CountFlags to counter_go118.go
Browse files Browse the repository at this point in the history
This will allow code that's building on Go 1.18 or earlier to compile
with a dependency on the CountFlags function (even though it's
disconnected and does nothing).

Change-Id: If5fdc8fa008149f3cdde6c22b89d18024a809cb8
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/559505
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
matloob committed Jan 31, 2024
1 parent a6426b6 commit 1cb064e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions counter/counter_go118.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@

package counter

import "fmt"

func Add(string, int64) {}
func Inc(string) {}
func Open() {}
import (
"flag"
"fmt"
)

func Add(string, int64) {}
func Inc(string) {}
func Open() {}
func CountFlags(prefix string, fs flag.FlagSet) {}

type Counter struct{ name string }

Expand Down

0 comments on commit 1cb064e

Please sign in to comment.