util

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeGeneratedCode

func InitializeGeneratedCode(ctx *genall.GenerationContext, header string, generator Generator, intoPath string) error

InitializeGeneratedCode ensures that intoPath exists; if the file is not yet present it is initialized with the output of the generator.

func LowerFirst

func LowerFirst(s string) string

LowerFirst sets the first alphabet to lowerCase.

func UpperFirst

func UpperFirst(s string) string

UpperFirst sets the first alphabet to upperCase.

func WriteGeneratedCode

func WriteGeneratedCode(ctx *genall.GenerationContext, header string, generator Generator, intoPath string) error

WriteGeneratedCode ensures that intoPath contains only the output of the generator.

Types

type Generator

type Generator interface {
	WriteContent(w io.Writer) error
}

Jump to

Keyboard shortcuts

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