Method 'produceSyncCommitteeContribution' differs only by capitalization to method 'ProduceSyncCommitteeContribution' in the same source file
476}
477
478// ProduceSyncCommitteeContribution requests that the beacon node produce a sync committee contribution.
479func (s *Server) produceSyncCommitteeContribution( 480 ctx context.Context,
481 w http.ResponseWriter,
482 slot primitives.Slot,
Method 'Get' differs only by capitalization to function 'get' in the same source file
80}
81
82// Get `state` using `slot` as key. Return nil if nothing is found.
83func (c *SyncCommitteeHeadStateCache[K, V]) Get(slot K) (V, error) { 84 var (
85 noState V
86 )
Method 'Clear' differs only by capitalization to function 'Clear' in the same source file
117}
118
119// Clear the BalanceCache to its initial state
120func (s *subnetIDsAggregatorCache[K, V]) Clear() { //nolint: unused, -- bug in golangci-lint 1.55121 purge[K, V](s)
122}
123
Method 'missCache' differs only by capitalization to function 'missCache' in the same source file
112 s.promCacheHit.Inc()
113}
114
115func (s *subnetIDsAggregatorCache[K, V]) missCache() { //nolint: unused, -- bug in golangci-lint 1.55116 s.promCacheMiss.Inc()
117}
118
Method 'hitCache' differs only by capitalization to function 'hitCache' in the same source file
108 return s.lru
109}
110
111func (s *subnetIDsAggregatorCache[K, V]) hitCache() { //nolint: unused, -- bug in golangci-lint 1.55112 s.promCacheHit.Inc()
113}
114
Method 'get' differs only by capitalization to function 'get' in the same source file
104 }, nil
105}
106
107func (s *subnetIDsAggregatorCache[K, V]) get() *lru.Cache[K, V] { //nolint: unused, -- bug in golangci-lint 1.55108 return s.lru
109}
110
Method 'Get' differs only by capitalization to function 'get' in the same source file
97
98// Get waits for any in progress calculation to complete before returning a
99// cached response, if any.
100func (c *SkipSlotCache[K, V]) Get(ctx context.Context, r K) (V, error) {101 ctx, span := trace.StartSpan(ctx, "skipSlotCache.Get")
102 defer span.End()
103 var noState V
Method 'CompressCommitteeCache' differs only by capitalization to function 'compressCommitteeCache' in the same source file
122
123// CompressCommitteeCache compresses the size of the committee cache.
124// This method is thread safe and should be called without a lock.
125func (c *CommitteeCache[K, V]) CompressCommitteeCache() {126 c.lock.Lock()
127 defer c.lock.Unlock()
128
Method 'Get' differs only by capitalization to function 'get' in the same source file
84}
85
86// Get returns the current epoch's effective balance for state `st` in cache.
87func (c *BalanceCache[K, V]) Get(st state.ReadOnlyBeaconState) (balance V, err error) { 88 var (
89 zero V
90 key K
Description
Methods or fields of struct that have names different only by capitalization could be confusing.
Bad practice
type SomeType struct {
// actual build system to be inferred, based on the `BuildSystem` passed by user
buildSystem string
// name of the build system to use
BuildSystem string
}
Recommended
type SomeType struct {
// actual build system to be inferred, based on the `BuildSystem` passed by user
internalBuildSystem string
// name of the build system to use
BuildSystem string
}