mirror of
https://github.com/lima-vm/lima.git
synced 2026-10-28 11:44:35 +08:00
Fix function and package comments
Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
This commit is contained in:
4 files changed
+11
-2
No files matched your search
@@ -137,6 +137,9 @@ issues:
|
||||
max-issues-per-linter: 0
|
||||
# Maximum count of issues with the same text.
|
||||
max-same-issues: 0
|
||||
include:
|
||||
- EXC0013 # revive: package comment should be of the form "(.+)..."
|
||||
- EXC0014 # revive: comment on exported (.+) should be of the form "(.+)..."
|
||||
exclude-rules:
|
||||
# Allow using Uid, Gid in pkg/osutil.
|
||||
- path: "pkg/osutil/"
|
||||
@@ -145,3 +148,7 @@ issues:
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- godot
|
||||
# Disable revive.exported for constants.
|
||||
- text: "exported: comment on exported const"
|
||||
linters:
|
||||
- revive
|
||||
@@ -1,2 +1,3 @@
|
||||
//go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative guestservice.proto --descriptor_set_out=guestservice.pb.desc
|
||||
|
||||
package api
|
||||
@@ -23,6 +23,7 @@ type Protocol string
|
||||
|
||||
const (
|
||||
// UDP/SCTP when lima port forwarding works on those protocols.
|
||||
|
||||
TCP Protocol = "TCP"
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -324,13 +324,13 @@ func watchHostAgentEvents(ctx context.Context, inst *store.Instance, haStdoutPat
|
||||
|
||||
type watchHostAgentEventsTimeoutKey = struct{}
|
||||
|
||||
// WithWatchHostAgentEventsTimeout sets the value of the timeout to use for
|
||||
// WithWatchHostAgentTimeout sets the value of the timeout to use for
|
||||
// watchHostAgentEvents in the given Context.
|
||||
func WithWatchHostAgentTimeout(ctx context.Context, timeout time.Duration) context.Context {
|
||||
return context.WithValue(ctx, watchHostAgentEventsTimeoutKey{}, timeout)
|
||||
}
|
||||
|
||||
// watchHostAgentEventsTimeout returns the value of the timeout to use for
|
||||
// watchHostAgentTimeout returns the value of the timeout to use for
|
||||
// watchHostAgentEvents contained in the given Context, or its default value.
|
||||
func watchHostAgentTimeout(ctx context.Context) time.Duration {
|
||||
if timeout, ok := ctx.Value(watchHostAgentEventsTimeoutKey{}).(time.Duration); ok {
|
||||
|
||||
Reference in new issue
Block a user