utils

package
v0.0.0-...-6f2b15d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListUpFilePaths

func ListUpFilePaths(targetFolder string, regexpPattern string) ([]string, error)

対象のフォルダからpatternにマッチするファイルを取得する

func ShouldSkip

func ShouldSkip(outputFilePath string) (bool, error)

コード生成をスキップすべきかどうかを判定

func ToSnakeCase

func ToSnakeCase(str string) string

キャメルケースをスネークケースに変換する

Types

type FieldDef

type FieldDef struct {
	Name string
	Type string
}

構造体のフィールド定義

func (FieldDef) Alias

func (fd FieldDef) Alias() string

type StructDef

type StructDef struct {
	Name   string
	Fields []FieldDef
}

構造体定義

func ParseFirstStruct

func ParseFirstStruct(fpath string) ([]StructDef, error)

ファイルをパースして構造体の定義を返却

func (StructDef) Alias

func (sd StructDef) Alias() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL