Files
learngo/interfaces/12-marshaler/main.go

22 lines
397 B
Go
Raw Normal View History

2019-09-07 22:23:42 +03:00
// For more tutorials: https://blog.learngoprogramming.com
//
// Copyright © 2018 Inanc Gumus
// Learn Go Programming Course
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
//
package main
import (
"fmt"
)
2019-10-17 14:11:51 +03:00
func main() {
// removed error handling for brevity (normally you shouldn't do this).
out, _ := encode()
fmt.Println(string(out))
2019-09-07 22:23:42 +03:00
2019-10-17 14:11:51 +03:00
l, _ := decode(out)
fmt.Print(l)
2019-09-07 22:23:42 +03:00
}