Skip to content

Commit 9f1dc49

Browse files
committed
fix(command): trim command for strings
1 parent 333ebb9 commit 9f1dc49

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
entry: goimports
2626
files: \.go$
2727
additional_dependencies:
28-
- golang.org/x/tools/cmd/goimports@latest
28+
- golang.org/x/tools/cmd/goimports@v0.24.0
2929
args:
3030
- -w
3131
require_serial: true

chunk.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ func (this *SQCloud) sendString(data string) (int, error) {
287287
}
288288
}
289289

290+
data = strings.Trim(data, " \t\r\n")
291+
290292
rawBuffer := protocolBufferFromString(data, false)[0]
291293
bytesToSend = len(rawBuffer)
292294

0 commit comments

Comments
 (0)