Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Fanatics/toast

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Fanatics/toast

  • v0.0.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

toast logo GoDoc

toast is a plugin-driven code generation tool that parses regular Go code, rather than an IDL like Protobufs or other common defintion code.

Why?

Fanatics loves Go, we have a lot of Go code, and after using plenty of other code generation tools, it struck us that Go code as an IDL could be a nice alternative.

toast makes it much easier to generate code from your Go code, since it gives you pre-parsed AST-like data about your packages and files. Why the name "toast", you ask? toast is a tool to turn your Go code "to AST" in a helpful way.

Usage

$ toast --input . \
    --plugin amdm_gen_db:out=./internal/db \   
    --plugin "amdm_gen_proto --option1 value1 -o v2:out=./api/proto"

See a basic example plugin written in Go.

Installation

If you have Go installed, run:

$ go get github.com/Fanatics/toast/...

Once the project is at a more stable point, pre-built binaries will be made available for download across common platforms.

Status

toast is still under heavy development. Tests are still being written, APIs will change without notice. However, feel free to give it a spin, open issues and submit PRs.

The simplified AST that is sent to a plugin's stdin may (and probably should) change from version to version. It is incomplete, and once tests are ready, we will have a better idea of what else is left to parse and collect.

Please open issues if/when you encounter incompleteness or errors!

Disclaimer

This is not an official Fanatics product (experimental or otherwise), it is just code that happens to be owned by Fanatics.


Want to work on projects like this? Get in touch.

FAQs

Package last updated on 18 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc