specta_go/lib.rs
1//! [Go](https://go.dev) language exporter for [Specta](specta).
2//!
3//! <div class="warning">
4//! This crate is still in active development and is not yet ready for general purpose use!
5//! </div>
6//!
7//! # Usage
8//!
9//! ```rust
10//! use specta::Types;
11//! use specta_go::Go;
12//!
13//! #[derive(specta::Type)]
14//! pub struct MyType {
15//! pub field: String,
16//! }
17//!
18//! let types = Types::default().register::<MyType>();
19//!
20//! Go::default()
21//! .export_to("./bindings.go", &types, specta_serde::Format)
22//! .unwrap();
23//! ```
24
25#![cfg_attr(docsrs, feature(doc_cfg))]
26#![doc(
27 html_logo_url = "https://github.com/specta-rs/specta/raw/main/.github/logo-128.png",
28 html_favicon_url = "https://github.com/specta-rs/specta/raw/main/.github/logo-128.png"
29)]
30
31mod error;
32mod go;
33mod primitives;
34mod reserved_names;
35
36pub use error::Error;
37pub use go::{Go, Layout};