/
getaccount.go
39 lines (32 loc) · 1.05 KB
/
getaccount.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright © 2018-2020 Satinderjit Singh.
//
// See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at
// the top-level directory of this distribution for the individual copyright
// holder information and the developer policies on copyright and licensing.
//
// Unless otherwise agreed in a custom licensing agreement, no part of the
// kmdgo software, including this file may be copied, modified, propagated.
// or distributed except according to the terms contained in the LICENSE file
//
// Removal or modification of this copyright notice is prohibited.
package main
import (
"fmt"
"github.com/satindergrewal/kmdgo"
"log"
)
func main() {
var appName kmdgo.AppType
appName = `komodo`
var grbact kmdgo.GetAccount
taddress := `RA1vrNf9Aej4Rt6gu4xNG66Zcy2KgjnPia`
grbact, err := appName.GetAccount(taddress)
if err != nil {
fmt.Printf("Code: %v\n", grbact.Error.Code)
fmt.Printf("Message: %v\n\n", grbact.Error.Message)
log.Fatalln("Err happened", err)
}
fmt.Println("grbact value", grbact)
fmt.Println("-------")
fmt.Println(grbact.Result)
}