mirror of
https://github.com/mudler/luet.git
synced 2025-09-22 19:48:27 +00:00
Use goreleaser to build and release (#244)
Instead of using gox on one side and an action to release, we can merge them together with goreleaser which will build for extra targets (arm, mips if needed in the future) and it also takes care of creating checksums, a source archive, and a changelog and creating a release with all the artifacts. All binaries should respect the old naming convention, so any scripts out there should still work. Signed-off-by: Itxaka <igarcia@suse.com>
This commit is contained in:
13
vendor/github.com/huandu/xstrings/format.go
generated
vendored
13
vendor/github.com/huandu/xstrings/format.go
generated
vendored
@@ -4,7 +4,6 @@
|
||||
package xstrings
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
@@ -28,7 +27,7 @@ func ExpandTabs(str string, tabSize int) string {
|
||||
|
||||
var r rune
|
||||
var i, size, column, expand int
|
||||
var output *bytes.Buffer
|
||||
var output *stringBuilder
|
||||
|
||||
orig := str
|
||||
|
||||
@@ -43,7 +42,7 @@ func ExpandTabs(str string, tabSize int) string {
|
||||
}
|
||||
|
||||
for i = 0; i < expand; i++ {
|
||||
output.WriteByte(byte(' '))
|
||||
output.WriteRune(' ')
|
||||
}
|
||||
|
||||
column += expand
|
||||
@@ -88,7 +87,7 @@ func LeftJustify(str string, length int, pad string) string {
|
||||
remains := length - l
|
||||
padLen := Len(pad)
|
||||
|
||||
output := &bytes.Buffer{}
|
||||
output := &stringBuilder{}
|
||||
output.Grow(len(str) + (remains/padLen+1)*len(pad))
|
||||
output.WriteString(str)
|
||||
writePadString(output, pad, padLen, remains)
|
||||
@@ -114,7 +113,7 @@ func RightJustify(str string, length int, pad string) string {
|
||||
remains := length - l
|
||||
padLen := Len(pad)
|
||||
|
||||
output := &bytes.Buffer{}
|
||||
output := &stringBuilder{}
|
||||
output.Grow(len(str) + (remains/padLen+1)*len(pad))
|
||||
writePadString(output, pad, padLen, remains)
|
||||
output.WriteString(str)
|
||||
@@ -140,7 +139,7 @@ func Center(str string, length int, pad string) string {
|
||||
remains := length - l
|
||||
padLen := Len(pad)
|
||||
|
||||
output := &bytes.Buffer{}
|
||||
output := &stringBuilder{}
|
||||
output.Grow(len(str) + (remains/padLen+1)*len(pad))
|
||||
writePadString(output, pad, padLen, remains/2)
|
||||
output.WriteString(str)
|
||||
@@ -148,7 +147,7 @@ func Center(str string, length int, pad string) string {
|
||||
return output.String()
|
||||
}
|
||||
|
||||
func writePadString(output *bytes.Buffer, pad string, padLen, remains int) {
|
||||
func writePadString(output *stringBuilder, pad string, padLen, remains int) {
|
||||
var r rune
|
||||
var size int
|
||||
|
||||
|
Reference in New Issue
Block a user