heetch / heetch/avro

Handle more logical types

Open
#3 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
95
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Hey @rogpeppe !
I tried to use some logical type like `time.Time` in the example you gave me in playground, but it failed. (https://play.golang.org/p/3XUf8IgChxN)
Maybe it is not handled yet ? :) btw really good job !

```
package main

import (
"fmt"
"log"
"time"

"github.com/heetch/avro"
)

func main() {
type Foo struct {
A int
B *string
C []string
D time.Time
}
data, dataType, err := avro.Marshal(Foo{
A: 99,
C: []string{"hello world"},
})
if err != nil {
log.Fatal(err)
}
var f Foo
if _, err := avro.Unmarshal(data, &f, dataType); err != nil {
log.Fatal(err)
}
fmt.Printf("round trip: %#v\n", f)
fmt.Printf("schema: %v\n", dataType)
}

```

output:

```
2009/11/10 23:00:00 cannot make Avro schema for Go type uint64
```
thanks in advance 👍

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.