mariotoffia / goasciidoc

Document your go code using asciidoc instead of godoc
Apache License 2.0
18 stars 0 forks source link

Cannot handle type Time time.Time #4

Closed mariotoffia closed 4 years ago

mariotoffia commented 4 years ago

When generating a source with

// Time defines a _Unix Timestamp_ encoded as epoch seconds in JSON
//
// It is also able to create _time.Time_ with a specific timezone from
// this _UTC_ timestamp that have https://www.iana.org/time-zones[IANA compatible zone names].
// In order to create such _time.Time_ use the extension function
// @WithTimeZone.
type Time time.Time

the internal_parser prints the ast (meaning not supported):

0  *ast.SelectorExpr {
     1  .  X: *ast.Ident {
     2  .  .  NamePos: /home/martoffi/progs/crossbreed/platform/go-core/model/jsontime.go:17:11
     3  .  .  Name: "time"
     4  .  }
     5  .  Sel: *ast.Ident {
     6  .  .  NamePos: /home/martoffi/progs/crossbreed/platform/go-core/model/jsontime.go:17:16
     7  .  .  Name: "Time"
     8  .  }
     9  }

Line 17 is: type Time time.Time.