Documentation
¶
Overview ¶
Package postprocessing provides tools for the YAML-based postprocessing workflow.
Index ¶
- func Apply(outDir string, cfg *config.Postprocess) error
- func ApplyMethodOperations(outDir string, methodOperations []config.MethodOperation) error
- func CopyFiles(outDir string, copyConfigs []config.CopyConfig) error
- func DeleteMethod(path, funcName, language string) error
- func DeprecateMethod(path, funcName, deprecationMessage, language string) error
- func DuplicateMethod(path, funcName, newName, language string) error
- func RemoveFiles(outDir string, removePatterns []string) error
- func Replace(path, original, replacement string) error
- func ReplaceAll(outDir string, replaceConfigs []config.ReplaceConfig) error
- func ReplaceRegex(path, pattern, replacement string) error
- func ReplaceRegexAll(outDir string, replaceRegexConfigs []config.ReplaceRegexConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶ added in v0.26.0
func Apply(outDir string, cfg *config.Postprocess) error
Apply executes all configured post-processing operations against outDir in sequential order.
func ApplyMethodOperations ¶ added in v0.26.0
func ApplyMethodOperations(outDir string, methodOperations []config.MethodOperation) error
ApplyMethodOperations executes method operations across matching files in outDir.
func CopyFiles ¶ added in v0.26.0
func CopyFiles(outDir string, copyConfigs []config.CopyConfig) error
CopyFiles copies files specified by copyConfigs from src to dst inside outDir.
func DeleteMethod ¶ added in v0.22.0
DeleteMethod deletes all matching methods from a Java file. It handles brace counting to remove the entire method body.
Note: funcName must be the complete, single-line method signature declaration (including modifiers and return type, e.g., "public void foo()"). Matching is done via exact substring search, so any spacing or formatting mismatch will fail.
func DeprecateMethod ¶ added in v0.22.0
DeprecateMethod deprecates a Java method by adding the @Deprecated annotation and appending a @deprecated tag in its Javadoc block.
Note: funcName must be the complete, single-line method signature declaration (including modifiers and return type, e.g., "public void foo()"). Matching is done via exact substring search, so any spacing or formatting mismatch will fail.
func DuplicateMethod ¶ added in v0.22.0
DuplicateMethod extracts a method block, renames it, and appends it immediately after the original method.
Note: funcName must be the complete, single-line method signature declaration (including modifiers and return type, e.g., "public void foo()"). Matching is done via exact substring search, so any spacing or formatting mismatch will fail.
func RemoveFiles ¶ added in v0.26.0
RemoveFiles removes all files in outDir matching the given patterns (exact paths or globs).
func Replace ¶
Replace finds and replaces exact text in a file. It returns an error if the target file does not exist or if the text is not found.
func ReplaceAll ¶ added in v0.26.0
func ReplaceAll(outDir string, replaceConfigs []config.ReplaceConfig) error
ReplaceAll applies exact text replacements specified by replaceConfigs across matching files in outDir.
func ReplaceRegex ¶
ReplaceRegex finds and replaces text in a file using a regular expression. It returns an error if the target file does not exist or if the pattern matches no text.
func ReplaceRegexAll ¶ added in v0.26.0
func ReplaceRegexAll(outDir string, replaceRegexConfigs []config.ReplaceRegexConfig) error
ReplaceRegexAll applies regex replacements specified by replaceRegexConfigs across matching files in outDir.
Types ¶
This section is empty.