SkillAgentSearch skills...

Go2dts

A simple cli-tools to transform golang `struct` and `const` to typescript `interface` and `type`

Install / Use

/learn @fabien0102/Go2dts
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Go2dts

logo

A simple cli-tools to transform golang struct and const to typescript interface and type

Installation

npm i -g go2dts

Usage

go2dts <goLangDirs ...> <typescriptFile>

Testing and developing

Just put your golang file into __tests__/inputs and it will be parse each time you execute npm test or npm start.

npm start is more quick, so perfect to add some console.log and improve the parsing.

npm test --watch generate a snapshot, so you can just update this one to the expecting state and start coding to have everything green #TDDStyle

Know issues

  • The type mapping is incomplete (I'm not a golang developper, so I add types when I discover them)
  • This library will not follow the import dependencies, so the output types can be broken
View on GitHub
GitHub Stars44
CategoryDevelopment
Updated6mo ago
Forks5

Languages

Go

Security Score

72/100

Audited on Sep 8, 2025

No findings