Skip to content
Snippets Groups Projects
Verified Commit eeffd758 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: update go libs #3

parent 1db13de5
No related branches found
No related tags found
No related merge requests found
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownSettings">
<enabledExtensions>
<entry key="MermaidLanguageExtension" value="false" />
<entry key="PlantUMLLanguageExtension" value="true" />
</enabledExtensions>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/data.iml" filepath="$PROJECT_DIR$/.idea/data.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/volker-schukai/tokenizer v1.0.0 h1:wF4haFoCodq7lgAk8c+th/DZmpFpL2WVD8wDzAGU1mA=
github.com/volker-schukai/tokenizer v1.0.0/go.mod h1:LPw7lLIxUnZgeg96818N7IvwLE1x8ya31J/Aa0aCq9M=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.3.1 h1:oyElaqEiyr2XgaE1CYwD8LoeHsuR/vQD/p6k3jYbJFs=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.3.1/go.mod h1:UvdD4NAf3gLKYafabJD7e9ZCOetzM9JZ9y4GkZukPVU=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.4.0 h1:eAEsq3lsHwMe5Zz71vNab5csPtp8S+i5zFPmNnDPFDg=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.4.0/go.mod h1:UvdD4NAf3gLKYafabJD7e9ZCOetzM9JZ9y4GkZukPVU=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.8.1 h1:A3KvLvu4rV3OstgEn6xHulhQaXawVvzFzbafYHWHUfs=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.8.1/go.mod h1:MqCBFv7DXKoBE2rZDc51LGvl2QI7Kz0D+XkQ0izj+ws=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.9.1 h1:WpM6PcFqQZWPBGDEuMILWHq98dPVBLAxi8ae9QMWWbM=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.9.1/go.mod h1:MqCBFv7DXKoBE2rZDc51LGvl2QI7Kz0D+XkQ0izj+ws=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
package data
import (
"crypto/md5"
"crypto/sha1"
"crypto/md5" // #nosec
"crypto/sha1" // #nosec
"crypto/sha256"
"encoding/base64"
"encoding/hex"
......@@ -706,11 +706,13 @@ func handleStrings(tokens TokenList, currentValue string) (any, error) {
} else if tokens[0].Is(PipeCmdMD5) {
// #nosec
d := md5.Sum([]byte(currentValue))
return hex.EncodeToString(d[:]), nil
} else if tokens[0].Is(PipeCmdSHA1) {
// #nosec
d := sha1.Sum([]byte(currentValue))
return hex.EncodeToString(d[:]), nil
......
......@@ -45,14 +45,14 @@ func wordWrap(str string, width uint, br string) string {
current = 0
} else {
current += uint(spacebuf.Len())
spacebuf.WriteTo(buf)
_, _ = spacebuf.WriteTo(buf)
}
spacebuf.Reset()
} else {
current += uint(spacebuf.Len() + wordbuf.Len())
spacebuf.WriteTo(buf)
_, _ = spacebuf.WriteTo(buf)
spacebuf.Reset()
wordbuf.WriteTo(buf)
_, _ = wordbuf.WriteTo(buf)
wordbuf.Reset()
}
buf.WriteRune(char)
......@@ -60,9 +60,9 @@ func wordWrap(str string, width uint, br string) string {
} else if unicode.IsSpace(char) {
if spacebuf.Len() == 0 || wordbuf.Len() > 0 {
current += uint(spacebuf.Len() + wordbuf.Len())
spacebuf.WriteTo(buf)
_, _ = spacebuf.WriteTo(buf)
spacebuf.Reset()
wordbuf.WriteTo(buf)
_, _ = wordbuf.WriteTo(buf)
wordbuf.Reset()
}
spacebuf.WriteRune(char)
......@@ -78,11 +78,11 @@ func wordWrap(str string, width uint, br string) string {
if wordbuf.Len() == 0 {
if current+uint(spacebuf.Len()) <= width {
spacebuf.WriteTo(buf)
_, _ = spacebuf.WriteTo(buf)
}
} else {
spacebuf.WriteTo(buf)
wordbuf.WriteTo(buf)
_, _ = spacebuf.WriteTo(buf)
_, _ = wordbuf.WriteTo(buf)
}
return buf.String()
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment