Documentation
¶
Overview ¶
Package postprocessing provides tools for the YAML-based postprocessing workflow.
Index ¶
- func CopyFile(src, dst string) error
- func DeleteMethod(path, funcName, language string) error
- func DeprecateMethod(path, funcName, deprecationMessage, language string) error
- func DuplicateMethod(ctx context.Context, path, funcName, newName, language string) error
- func RemoveFile(path string) error
- func Replace(path, original, replacement string) error
- func ReplaceRegex(path, pattern, replacement string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶
CopyFile copies a single file from the src path to the dst path. It acts as a wrapper around filesystem.CopyFile to provide a unified interface for all postprocessing file operations.
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 RemoveFile ¶
RemoveFile removes the file at the specified path.
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 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.
Types ¶
This section is empty.