[misc] Minor changes

This commit is contained in:
Ciprian Dorin Craciun 2019-08-12 00:02:17 +03:00
parent 025cd765c1
commit 3d1694bbd1
2 changed files with 12 additions and 11 deletions

View file

@ -47,28 +47,28 @@
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
-v \
-ldflags '-s' \
-ldflags 'all=-s' \
-gcflags 'all=-l=4' \
-o "${_outputs}/binaries/release/kawipiko-server" \
-- ./cmd/server.go \
#
!!
<< go / build / server / release / analyze
<< go / build / server / analyze
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
rm -f -- "${_outputs}/binaries/debug/kawipiko-server"
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
-v \
-ldflags '-s' \
-gcflags '-m' \
-o "${_outputs}/binaries/debug/kawipiko-server" \
-- ./cmd/server.go \
#
!!
<< go / build / server / release / analyze / escapes
"${ZRUN[@]}" ':: go / build / server / release / analyze' "${@}" \
<< go / build / server / analyze / escapes
"${ZRUN[@]}" ':: go / build / server / analyze' "${@}" \
2>&1 \
| grep -F -e ' escapes ' \
| LC_ALL=C sort -n -k 2,2 -t ':'
@ -123,7 +123,8 @@
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
-v \
-ldflags '-s' \
-ldflags 'all=-s' \
-gcflags 'all=-l=4' \
-o "${_outputs}/binaries/release/kawipiko-archiver" \
-- ./cmd/archiver.go \
#

View file

@ -142,14 +142,14 @@ func archiveFile (_context *context, _pathResolved string, _pathInArchive string
func archiveFolder (_context *context, _pathResolved string, _pathInArchive string, _names []string, _stats map[string]os.FileInfo) (error) {
type Entry struct {
Name string `json:"name",omitempty`
Type string `json:"type",omitempty`
Size uint64 `json:"size",omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Size uint64 `json:"size,omitempty"`
}
type Folder struct {
Entries []Entry `json:"entries",omitempty`
Indices []string `json:"indices",omitempty`
Entries []Entry `json:"entries,omitempty"`
Indices []string `json:"indices,omitempty"`
}
_entries := make ([]Entry, 0, len (_names))