Skip to content

Commit 3ee5764

Browse files
jnan806binbin0325
authored andcommitted
ci: Update args of golangci-lint in ci.yml (alibaba#535)
Signed-off-by: Jiangnan Jia <jnan0806@gmail.com>
1 parent e2f2f73 commit 3ee5764

File tree

10 files changed

+13
-13
lines changed

10 files changed

+13
-13
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: golangci/golangci-lint-action@v3
2727
with:
2828
version: latest
29-
args: "--out-${NO_FUTURE}format colored-line-number"
29+
args: "--out-format colored-line-number"
3030

3131
build:
3232
name: Build and test - Go ${{ matrix.go_version }}

api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func WithAttachment(key interface{}, value interface{}) EntryOption {
117117
}
118118
}
119119

120-
// WithAttachment set the resource entry with the given k-v pairs
120+
// WithAttachments set the resource entry with the given k-v pairs
121121
func WithAttachments(data map[interface{}]interface{}) EntryOption {
122122
return func(opts *EntryOptions) {
123123
if opts.attachments == nil {

core/base/slot_chain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func NewSlotChain() *SlotChain {
110110
}
111111
}
112112

113-
// Get a EntryContext from EntryContext ctxPool, if ctxPool doesn't have enough EntryContext then new one.
113+
// Get an EntryContext from EntryContext ctxPool, if ctxPool doesn't have enough EntryContext then new one.
114114
func (sc *SlotChain) GetPooledContext() *EntryContext {
115115
ctx := sc.ctxPool.Get().(*EntryContext)
116116
ctx.startTime = util.CurrentTimeMillis()

core/circuitbreaker/circuit_breaker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func (b *circuitBreakerBase) fromHalfOpenToOpen(snapshot interface{}) bool {
229229
return false
230230
}
231231

232-
// fromHalfOpenToOpen updates circuit breaker state machine from half-open to closed
232+
// fromHalfOpenToClosed updates circuit breaker state machine from half-open to closed
233233
// Return true only if current goroutine successfully accomplished the transformation.
234234
func (b *circuitBreakerBase) fromHalfOpenToClosed() bool {
235235
if b.state.cas(HalfOpen, Closed) {

core/system_metric/sys_metric_stat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func init() {
7878
metric_exporter.Register(processMemoryGauge)
7979
}
8080

81-
// getMemoryStat returns the current machine's memory statistic
81+
// getTotalMemorySize returns the current machine's memory statistic
8282
func getTotalMemorySize() (total uint64) {
8383
stat, err := mem.VirtualMemory()
8484
if err != nil {

ext/datasource/hotspot_rule_converter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (s *SpecificValue) String() string {
9393
return fmt.Sprintf("SpecificValue: [ValKind: %+v, ValStr: %s]", s.ValKind, s.ValStr)
9494
}
9595

96-
// arseSpecificItems parses the SpecificValue as real value.
96+
// parseSpecificItems parses the SpecificValue as real value.
9797
func parseSpecificItems(source []SpecificValue) map[interface{}]int64 {
9898
ret := make(map[interface{}]int64, len(source))
9999
if len(source) == 0 {

pkg/adapters/micro/options.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ type (
2626
}
2727
)
2828

29-
// WithUnaryClientResourceExtractor sets the resource extractor of unary client request.
29+
// WithClientResourceExtractor sets the resource extractor of unary client request.
3030
// The second string parameter is the full method name of current invocation.
3131
func WithClientResourceExtractor(fn func(context.Context, client.Request) string) Option {
3232
return func(opts *options) {
3333
opts.clientResourceExtract = fn
3434
}
3535
}
3636

37-
// WithUnaryServerResourceExtractor sets the resource extractor of unary server request.
37+
// WithServerResourceExtractor sets the resource extractor of unary server request.
3838
func WithServerResourceExtractor(fn func(context.Context, server.Request) string) Option {
3939
return func(opts *options) {
4040
opts.serverResourceExtract = fn
@@ -55,15 +55,15 @@ func WithStreamServerResourceExtractor(fn func(server.Stream) string) Option {
5555
}
5656
}
5757

58-
// WithUnaryClientBlockFallback sets the block fallback handler of unary client request.
58+
// WithClientBlockFallback sets the block fallback handler of unary client request.
5959
// The second string parameter is the full method name of current invocation.
6060
func WithClientBlockFallback(fn func(context.Context, client.Request, *base.BlockError) error) Option {
6161
return func(opts *options) {
6262
opts.clientBlockFallback = fn
6363
}
6464
}
6565

66-
// WithUnaryServerBlockFallback sets the block fallback handler of unary server request.
66+
// WithServerBlockFallback sets the block fallback handler of unary server request.
6767
func WithServerBlockFallback(fn func(context.Context, server.Request, *base.BlockError) error) Option {
6868
return func(opts *options) {
6969
opts.serverBlockFallback = fn

pkg/datasource/etcdv3/etcdv3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (s *Etcdv3DataSource) processWatchResponse(resp *clientv3.WatchResponse) {
8181
}
8282

8383
if err := resp.Err(); err != nil {
84-
logging.Error(err, "Watch on etcd endpoints occur error", "endpointd", s.client.Endpoints())
84+
logging.Error(err, "Watch on etcd endpoints occur error", "endpoints", s.client.Endpoints())
8585
return
8686
}
8787

pkg/datasource/k8s/controllers/hotspotrules_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (r *HotspotRulesReconciler) assembleHotspotRules(rs *datasourcev1.HotspotRu
151151
return ret
152152
}
153153

154-
// arseSpecificItems parses the SpecificValue as real value.
154+
// parseSpecificItems parses the SpecificValue as real value.
155155
func parseSpecificItems(source []datasourcev1.SpecificValue) map[interface{}]int64 {
156156
ret := make(map[interface{}]int64)
157157
if len(source) == 0 {

util/time.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func CurrentClock() Clock {
255255
return currentClock.Load().(*clockWrapper).clock
256256
}
257257

258-
// SetClock sets the ticker creator used by util package.
258+
// SetTickerCreator sets the ticker creator used by util package.
259259
// In general, no need to set it. It is usually used for testing.
260260
func SetTickerCreator(tc TickerCreator) {
261261
currentTickerCreator.Store(&tickerCreatorWrapper{tc})

0 commit comments

Comments
 (0)