fix: fix linting errors and test
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 10s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 30s
CI Workflow / CI run build and linting (pull_request) Failing after 10s
CI Workflow / Code coverage report (pull_request) Has been skipped
CI Workflow / CI run tests (pull_request) Failing after 10m19s
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 10s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 30s
CI Workflow / CI run build and linting (pull_request) Failing after 10s
CI Workflow / Code coverage report (pull_request) Has been skipped
CI Workflow / CI run tests (pull_request) Failing after 10m19s
This commit is contained in:
parent
a63ae1831d
commit
c15f21a16d
4 changed files with 23 additions and 10 deletions
|
|
@ -2,10 +2,10 @@ package utils
|
|||
|
||||
func RemoveQuotes(src string) string {
|
||||
var res string
|
||||
if len(src) > 0 && src[0] == '"' {
|
||||
if src != "" && src[0] == '"' {
|
||||
res = src[1:]
|
||||
}
|
||||
if len(res) > 0 && res[len(res)-1] == '"' {
|
||||
if res != "" && res[len(res)-1] == '"' {
|
||||
res = res[:len(res)-1]
|
||||
}
|
||||
return res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue