diff --git a/counter/counter.go b/counter/counter.go index e6af9ea..850663d 100644 --- a/counter/counter.go +++ b/counter/counter.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.19 - package counter // The implementation of this package and tests are located in diff --git a/counter/counter_118.go b/counter/counter_118.go deleted file mode 100644 index 432e0d7..0000000 --- a/counter/counter_118.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.19 - -package counter - -import ( - "flag" -) - -func Add(string, int64) {} -func Inc(string) {} -func Open() {} -func CountFlags(prefix string, fs flag.FlagSet) {} - -type Counter struct{ name string } - -func New(name string) *Counter { return &Counter{name} } -func (c *Counter) Add(n int64) {} -func (c *Counter) Inc() {} -func (c *Counter) Name() string { return c.name } - -type StackCounter struct{ name string } - -func NewStack(name string, _ int) *StackCounter { return &StackCounter{name} } -func (c *StackCounter) Counters() []*Counter { return nil } -func (c *StackCounter) Inc() {} -func (c *StackCounter) Names() []string { return nil } diff --git a/counter/countertest/countertest.go b/counter/countertest/countertest.go index b9bec1f..daad800 100644 --- a/counter/countertest/countertest.go +++ b/counter/countertest/countertest.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.19 - // countertest provides testing utilities for counters. // This package cannot be used except for testing. package countertest diff --git a/counter/countertest/countertest_go118.go b/counter/countertest/countertest_go118.go deleted file mode 100644 index d9eaecc..0000000 --- a/counter/countertest/countertest_go118.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.19 - -package countertest - -import "golang.org/x/telemetry/counter" - -func Open(telemetryDir string) {} - -func ReadCounter(c *counter.Counter) (count uint64, _ error) { - return 0, nil -} - -func ReadStackCounter(c *counter.StackCounter) (stackCounts map[string]uint64, _ error) { - return nil, nil -} - -func ReadFile(name string) (map[string]uint64, map[string]uint64, error) { return nil, nil, nil }