update code header format

This commit is contained in:
Jay
2026-08-12 09:52:25 -04:00
parent b25bc048be
commit 18d07bdc1d
3 changed files with 18 additions and 21 deletions
+10 -9
View File
@@ -1,18 +1,19 @@
package heartwood
import (
"context"
"fmt"
"github.com/neo4j/neo4j-go-driver/v6/neo4j"
)
// ========================================
// ----------------------------------------------------------------------------
// Schema Match Keys
// ========================================
// ----------------------------------------------------------------------------
func NewSimpleMatchKeys() *SimpleMatchKeys {
return &SimpleMatchKeys{
Keys: map[string][]string{
"User": {"pubkey"},
"Relay": {"url"},
"Event": {"id"},
"Tag": {"name", "value"},
"ReplacementKey": {"pubkey", "kind"},
@@ -20,9 +21,9 @@ func NewSimpleMatchKeys() *SimpleMatchKeys {
}
}
// ========================================
// ----------------------------------------------------------------------------
// Node Constructors
// ========================================
// ----------------------------------------------------------------------------
func NewUserNode(pubkey string) *Node {
return NewNode("User", Properties{"pubkey": pubkey})
@@ -49,9 +50,9 @@ func NewReplacementKeyNode(pubkey string, kind int) *Node {
})
}
// ========================================
// ----------------------------------------------------------------------------
// Relationship Constructors
// ========================================
// ----------------------------------------------------------------------------
func NewSignedRel(
start *Node, end *Node, props Properties) *Relationship {
@@ -102,9 +103,9 @@ func NewReferencesReplacementKeyRel(
"REFERENCES", "Tag", "ReplacementKey", start, end, props)
}
// ========================================
// ----------------------------------------------------------------------------
// Relationship Constructor Helpers
// ========================================
// ----------------------------------------------------------------------------
func validateNodeLabel(node *Node, role string, expectedLabel string) {
if !node.Labels.Contains(expectedLabel) {