mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Desktop integration (#2073)
* Open stash in system tray on Windows/MacOS * Add desktop notifications * MacOS Bundling * Add binary icon Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e48b2ba3e8
commit
0e514183a7
35
vendor/github.com/rs/zerolog/internal/cbor/types_test_64.go
generated
vendored
Normal file
35
vendor/github.com/rs/zerolog/internal/cbor/types_test_64.go
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// +build !386
|
||||
|
||||
package cbor
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var enc2 = Encoder{}
|
||||
|
||||
var integerTestCases_64bit = []struct {
|
||||
val int
|
||||
binary string
|
||||
}{
|
||||
// Value in 8 bytes.
|
||||
{0xabcd100000000, "\x1b\x00\x0a\xbc\xd1\x00\x00\x00\x00"},
|
||||
{1000000000000, "\x1b\x00\x00\x00\xe8\xd4\xa5\x10\x00"},
|
||||
// Value in 8 bytes.
|
||||
{-0xabcd100000001, "\x3b\x00\x0a\xbc\xd1\x00\x00\x00\x00"},
|
||||
{-1000000000001, "\x3b\x00\x00\x00\xe8\xd4\xa5\x10\x00"},
|
||||
|
||||
}
|
||||
|
||||
func TestAppendInt_64bit(t *testing.T) {
|
||||
for _, tc := range integerTestCases_64bit {
|
||||
s := enc2.AppendInt([]byte{}, tc.val)
|
||||
got := string(s)
|
||||
if got != tc.binary {
|
||||
t.Errorf("AppendInt(0x%x)=0x%s, want: 0x%s",
|
||||
tc.val, hex.EncodeToString(s),
|
||||
hex.EncodeToString([]byte(tc.binary)))
|
||||
}
|
||||
}
|
||||
}
|
||||
7
vendor/github.com/rs/zerolog/internal/json/base.go
generated
vendored
7
vendor/github.com/rs/zerolog/internal/json/base.go
generated
vendored
@@ -4,9 +4,8 @@ type Encoder struct{}
|
||||
|
||||
// AppendKey appends a new key to the output JSON.
|
||||
func (e Encoder) AppendKey(dst []byte, key string) []byte {
|
||||
if len(dst) > 1 && dst[len(dst)-1] != '{' {
|
||||
if dst[len(dst)-1] != '{' {
|
||||
dst = append(dst, ',')
|
||||
}
|
||||
dst = e.AppendString(dst, key)
|
||||
return append(dst, ':')
|
||||
}
|
||||
return append(e.AppendString(dst, key), ':')
|
||||
}
|
||||
|
||||
7
vendor/github.com/rs/zerolog/internal/json/types.go
generated
vendored
7
vendor/github.com/rs/zerolog/internal/json/types.go
generated
vendored
@@ -379,11 +379,10 @@ func (Encoder) AppendObjectData(dst []byte, o []byte) []byte {
|
||||
// to separate with existing content OR
|
||||
// 3. existing content has already other fields
|
||||
if o[0] == '{' {
|
||||
if len(dst) == 0 {
|
||||
o = o[1:]
|
||||
} else {
|
||||
o[0] = ','
|
||||
if len(dst) > 1 {
|
||||
dst = append(dst, ',')
|
||||
}
|
||||
o = o[1:]
|
||||
} else if len(dst) > 1 {
|
||||
dst = append(dst, ',')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user