Yaml to Struct -Online YAML to Go Struct Tool| GoTool online toolset

开发工具指南

GoTool provides an efficient online YAML to Struct tool. Supports retaining original YAML comments and custom Tag tags, which is an effective tool for Golang developers.

使用说明

Features

Convert YAML to Go Struct online, with support for parsing and preserving YAML comments.

Example

name: Sample Project # Project name
version: 1.0.0 # Version number
description: This is a sample project description # Project description
authors:
  - name: John Doe # Author name
  - name: Jane Smith # Author name

Generated Result

type Authors struct {
    Name string `json:"name" yaml:"name"` // Author name
}

type GenerateObj struct {
    Name string `json:"name" yaml:"name"` // Project name
    Version string `json:"version" yaml:"version"` // Version number
    Description string `json:"description" yaml:"description"` // Project description
    Authors []Authors `json:"authors" yaml:"authors"`
}