Skip to content

Commit

Permalink
Example #18: CBOR and basic data types
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Jul 2, 2020
1 parent 2d29521 commit 7944c65
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lesson7/marshalling/18_cbor_basic_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"fmt"
"github.com/fxamacker/cbor/v2"
)

func main() {
var a bool = true

var jsonOutput []byte

cborOutput, _ = cbor.Marshal(a)
fmt.Println(string(cborOutput))
}

0 comments on commit 7944c65

Please sign in to comment.