Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

convert Go structures to and from readable Markdown (codec).

NotificationsYou must be signed in to change notification settings

moul/mdcodec

Repository files navigation

Transform Go structures into readable Markdown, tailored for both human and machine consumption.

Features

  • Hierarchical struct representation using# for primary and nested lists for secondary structures.
  • Uses reflection.

Roadmap

  • Introduce concise single-line encodings.
  • Introduce markdown table support (Seemoul/mdtable).
  • Integrate native support within Amino.
  • Examples: develop markdown-centric APIs in Gnoland contracts. And Go clients.

Examples

mdcodec.Marshal``

typePersonstruct {Namestring`md:"title"`AgeintAddressstruct {CitystringStatestring    }}p:=Person{}p.Name="John Doe"p.Age=30p.Address.City="Sprintfield"p.Address.State="IL"md:=mdcodec.Marshal(p)fmt.Println(md)// Output:// # John Doe (Person)//// - **Age**: 30// - **Address**://   - **City**: Springfield//   - **State**: IL

mdcodec.Unmarshal

varpPersonerr:=mdcodec.Unmarshal(md,&p)

🔧 Installation

go get moul.io/mdcodec

About

convert Go structures to and from readable Markdown (codec).

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp