empty notes doesnt fail
parent
642622cc02
commit
717ced0380
|
|
@ -24,6 +24,9 @@ notes() (
|
||||||
_recurse_ids() {
|
_recurse_ids() {
|
||||||
local prefix="$1"
|
local prefix="$1"
|
||||||
local json="$2"
|
local json="$2"
|
||||||
|
if echo "$json" | jq .Branches | grep -q ^null$; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
local b64lines="$(echo "$json" | jq -r '.Branches | keys[]' | base64)"
|
local b64lines="$(echo "$json" | jq -r '.Branches | keys[]' | base64)"
|
||||||
if [ -z "$b64lines" ]; then
|
if [ -z "$b64lines" ]; then
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type Branch struct {
|
type Branch struct {
|
||||||
Leaf Leaf `json:"Leaf,omitempty"`
|
Leaf Leaf
|
||||||
Branches map[string]Branch `json:"Branches,omitempty"`
|
Branches map[string]Branch
|
||||||
}
|
}
|
||||||
|
|
||||||
func (branch Branch) IsZero() bool {
|
func (branch Branch) IsZero() bool {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue