From 3605d9229a1c2d7a2821e6344d496cb8c34050d0 Mon Sep 17 00:00:00 2001 From: yarex-4chain Date: Wed, 19 Jun 2024 09:00:13 +0200 Subject: [PATCH] feat(SPV-851) fix function descriptions to one-liners --- examples/example_keys.go | 4 +--- examples/utils.go | 20 +++++--------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/examples/example_keys.go b/examples/example_keys.go index 1914d13..68cc2e8 100644 --- a/examples/example_keys.go +++ b/examples/example_keys.go @@ -25,9 +25,7 @@ const ( ExamplePaymail string = "" ) -/* -GenerateKeys - function for generating keys (private and public) -*/ +// GenerateKeys - function for generating keys (private and public) func GenerateKeys() xpriv.KeyWithMnemonic { keys, err := xpriv.Generate() if err != nil { diff --git a/examples/utils.go b/examples/utils.go index 9674def..ef6f6c1 100644 --- a/examples/utils.go +++ b/examples/utils.go @@ -11,16 +11,12 @@ import ( // 'xPriv' | 'xPub' | 'adminKey' | 'Paymail' type keyType string -/* -ErrMessage - function for displaying errors about missing keys (see CheckIfAdminKeyExists, CheckIfXPrivExists) -*/ +// ErrMessage - function for displaying errors about missing keys (see CheckIfAdminKeyExists, CheckIfXPrivExists) func ErrMessage(key keyType) string { return fmt.Sprintf("Please provide a valid %s.", key) } -/* -HandlePanic - function used to handle a recovery after a panic - use with defer -*/ +// HandlePanic - function used to handle a recovery after a panic - use with defer func HandlePanic() { r := recover() @@ -29,9 +25,7 @@ func HandlePanic() { } } -/* -CheckIfXPrivExists - checks if ExampleXPriv is not empty -*/ +// CheckIfXPrivExists - checks if ExampleXPriv is not empty func CheckIfXPrivExists() { if ExampleXPriv == "" { fmt.Println(ErrMessage("xPriv")) @@ -39,9 +33,7 @@ func CheckIfXPrivExists() { } } -/* -CheckIfXPubExists - checks if ExampleXPub is not empty -*/ +// CheckIfXPubExists - checks if ExampleXPub is not empty func CheckIfXPubExists() { if ExampleXPub == "" { fmt.Println(ErrMessage("xPub")) @@ -49,9 +41,7 @@ func CheckIfXPubExists() { } } -/* -CheckIfAdminKeyExists - checks if ExampleAdminKey is not empty -*/ +// CheckIfAdminKeyExists - checks if ExampleAdminKey is not empty func CheckIfAdminKeyExists() { if ExampleAdminKey == "" { fmt.Println(ErrMessage("adminKey"))