cuelang.org/go@v0.10.1/internal/golangorgx/telemetry/counter/counter_disabled.go (about)

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build !go1.19 || openbsd || js || wasip1 || solaris || android || plan9 || 386
     6  
     7  package counter
     8  
     9  import (
    10  	"flag"
    11  )
    12  
    13  func Add(string, int64)                         {}
    14  func Inc(string)                                {}
    15  func Open()                                     {}
    16  func CountFlags(prefix string, fs flag.FlagSet) {}
    17  
    18  type Counter struct{ name string }
    19  
    20  func New(name string) *Counter  { return &Counter{name} }
    21  func (c *Counter) Add(n int64)  {}
    22  func (c *Counter) Inc()         {}
    23  func (c *Counter) Name() string { return c.name }
    24  
    25  type StackCounter struct{ name string }
    26  
    27  func NewStack(name string, _ int) *StackCounter { return &StackCounter{name} }
    28  func (c *StackCounter) Counters() []*Counter    { return nil }
    29  func (c *StackCounter) Inc()                    {}
    30  func (c *StackCounter) Names() []string         { return nil }