[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' \ exec -- "${ZRUN[@]}" ':: go / tool' \
build \ build \
-v \ -v \
-ldflags '-s' \ -ldflags 'all=-s' \
-gcflags 'all=-l=4' \
-o "${_outputs}/binaries/release/kawipiko-server" \ -o "${_outputs}/binaries/release/kawipiko-server" \
-- ./cmd/server.go \ -- ./cmd/server.go \
# #
!! !!
<< go / build / server / release / analyze << go / build / server / analyze
test "${#}" -eq 0 test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )" _outputs="$( exec -- readlink -e -- ./.outputs )"
rm -f -- "${_outputs}/binaries/debug/kawipiko-server" rm -f -- "${_outputs}/binaries/debug/kawipiko-server"
exec -- "${ZRUN[@]}" ':: go / tool' \ exec -- "${ZRUN[@]}" ':: go / tool' \
build \ build \
-v \ -v \
-ldflags '-s' \
-gcflags '-m' \ -gcflags '-m' \
-o "${_outputs}/binaries/debug/kawipiko-server" \ -o "${_outputs}/binaries/debug/kawipiko-server" \
-- ./cmd/server.go \ -- ./cmd/server.go \
# #
!! !!
<< go / build / server / release / analyze / escapes << go / build / server / analyze / escapes
"${ZRUN[@]}" ':: go / build / server / release / analyze' "${@}" \ "${ZRUN[@]}" ':: go / build / server / analyze' "${@}" \
2>&1 \ 2>&1 \
| grep -F -e ' escapes ' \ | grep -F -e ' escapes ' \
| LC_ALL=C sort -n -k 2,2 -t ':' | LC_ALL=C sort -n -k 2,2 -t ':'
@ -123,7 +123,8 @@
exec -- "${ZRUN[@]}" ':: go / tool' \ exec -- "${ZRUN[@]}" ':: go / tool' \
build \ build \
-v \ -v \
-ldflags '-s' \ -ldflags 'all=-s' \
-gcflags 'all=-l=4' \
-o "${_outputs}/binaries/release/kawipiko-archiver" \ -o "${_outputs}/binaries/release/kawipiko-archiver" \
-- ./cmd/archiver.go \ -- ./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) { func archiveFolder (_context *context, _pathResolved string, _pathInArchive string, _names []string, _stats map[string]os.FileInfo) (error) {
type Entry struct { type Entry struct {
Name string `json:"name",omitempty` Name string `json:"name,omitempty"`
Type string `json:"type",omitempty` Type string `json:"type,omitempty"`
Size uint64 `json:"size",omitempty"` Size uint64 `json:"size,omitempty"`
} }
type Folder struct { type Folder struct {
Entries []Entry `json:"entries",omitempty` Entries []Entry `json:"entries,omitempty"`
Indices []string `json:"indices",omitempty` Indices []string `json:"indices,omitempty"`
} }
_entries := make ([]Entry, 0, len (_names)) _entries := make ([]Entry, 0, len (_names))