Documentation
¶
Index ¶
- func ApplySourceEdits(data []byte, edits []SourceEdit) ([]byte, error)
- func AtomicWriteFile(path string, data []byte, perm os.FileMode) error
- func DiscoverWorkflowFiles(paths []string) ([]string, error)
- func RewriteWorkflowBytes(data []byte, changes []RewriteChange, opts RewriteOptions) ([]byte, error)
- type RewriteChange
- type RewriteOptions
- type SourceEdit
- type UseNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplySourceEdits ¶
func ApplySourceEdits(data []byte, edits []SourceEdit) ([]byte, error)
func DiscoverWorkflowFiles ¶
func RewriteWorkflowBytes ¶
func RewriteWorkflowBytes(data []byte, changes []RewriteChange, opts RewriteOptions) ([]byte, error)
Types ¶
type RewriteChange ¶
type RewriteChange struct {
Use UseNode
Action actions.ParsedAction
Decision policy.Decision
}
type RewriteOptions ¶
type RewriteOptions struct {
WriteMetadataComment bool
}
type SourceEdit ¶
func BuildSourceEdits ¶
func BuildSourceEdits(data []byte, changes []RewriteChange, opts RewriteOptions) ([]SourceEdit, error)
type UseNode ¶
type UseNode struct {
File string `json:"file"`
NodePath string `json:"node_path"`
Raw string `json:"raw"`
Line int `json:"line"`
Column int `json:"column"`
HeadLine string `json:"head_line"`
LineIndex int `json:"line_index"`
InlineComment string `json:"inline_comment,omitempty"`
}
func ExtractUsesFromFile ¶
func ExtractUsesFromFiles ¶
Click to show internal directories.
Click to hide internal directories.