existingfileparser

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const RecommendedSectionEnd = "END OF AUTOGENERATED SECTION BY SYNCER"
View Source
const RecommendedSectionStart = "THIS SECTION IS AUTOGENERATED BY SYNCER, DO NOT EDIT"

Variables

This section is empty.

Functions

func ContainsSubstring

func ContainsSubstring(substring string) func(string) bool

Types

type ParseConfig

type ParseConfig struct {
	SplitBy       string
	StartSection  func(string) bool
	EndSection    func(string) bool
	SectionTrim   func(string) string
	SectionSorter func([]string)
}

func RecommendedNewlineSeparatedConfig

func RecommendedNewlineSeparatedConfig() ParseConfig

type ParseResult

type ParseResult struct {
	State          *files.State
	PreAutogenMsg  string
	AutogenMsg     string
	PostAutogenMsg string
}

func Parse

func Parse(ctx context.Context, loader files.StateLoader, path files.Path, conf ParseConfig) (*ParseResult, error)

Jump to

Keyboard shortcuts

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