lbryschema.go/main.go
Jack Robison c62c175d8b
more
2017-09-12 12:02:30 -04:00

24 lines
366 B
Go

package lbryschema_go
import (
"os"
"./claim"
"fmt"
)
func main() {
args := os.Args[1:]
claim_hex := args[0]
decoded, err := claim.DecodeClaimHex(claim_hex)
if err != nil {
fmt.Println("Decoding error: ", err)
return
}
text, err := decoded.RenderJSON()
if err != nil {
fmt.Println("Decoding error: ", err)
return
}
fmt.Println(text)
return
}