Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/craftvscruft/tfrefactor
/ functions
Functions
58 in github.com/craftvscruft/tfrefactor
⨍
Functions
58
◇
Types & classes
4
↓ 13 callers
Function
CheckFatal
(err error)
cmd/rename.go:36
↓ 5 callers
Function
ParseAddress
(addr string)
refactor/address.go:39
↓ 5 callers
Method
RefNameArray
()
refactor/address.go:21
↓ 3 callers
Method
BlockType
()
refactor/address.go:32
↓ 3 callers
Function
ParseHclFile
(filename string)
refactor/parse.go:15
↓ 3 callers
Method
addFileUpdate
(fileUpdate *FileUpdate)
refactor/update_plan.go:13
↓ 3 callers
Function
diffText
(beforeText, afterText string, context int)
refactor/diff.go:5
↓ 2 callers
Function
Mv
(fromAddressString, toFile, configPath string)
refactor/mv.go:13
↓ 2 callers
Function
ParseHclBytes
Source parses HCL and returns *hclwrite.File filename is a metadata of input stream and used only for an error message.
refactor/parse.go:25
↓ 2 callers
Method
RefName
()
refactor/address.go:28
↓ 2 callers
Function
RenameInFile
(filename string, file *hclwrite.File, fromAddress, toAddress *Address)
refactor/rename.go:59
↓ 2 callers
Function
applyUpdate
(plan *refactor.UpdatePlan)
cmd/apply.go:43
↓ 2 callers
Function
approveAndApplyUpdate
(cmd *cobra.Command, plan *refactor.UpdatePlan)
cmd/apply.go:11
↓ 2 callers
Function
createTraversal
(labels []string)
refactor/rename.go:45
↓ 2 callers
Function
findOrCreateLocalsBlock
(parsedFile *hclwrite.File)
refactor/mv.go:70
↓ 2 callers
Function
matchLabels
matchLabels returns true only if the matched and false otherwise.
refactor/rename.go:121
↓ 2 callers
Function
newUpdatePlan
()
refactor/update_plan.go:16
↓ 2 callers
Function
newVersionCmd
()
cmd/version.go:17
↓ 2 callers
Function
normalizeNewlines
NormalizeNewlines normalizes \r\n (windows) and \r (mac) into \n (unix)
refactor/mv_test.go:188
↓ 2 callers
Function
safeParseConfig
safeParseConfig parses config and recovers if panic occurs. The current hclwrite implementation is no perfect and will panic if unparseable input is g
refactor/parse.go:33
↓ 2 callers
Function
setDefaultStream
(cmd *cobra.Command)
cmd/root.go:21
↓ 1 callers
Function
Execute
()
cmd/root.go:27
↓ 1 callers
Function
Rename
(fromAddressString, toAddressString, configPath string)
refactor/rename.go:11
↓ 1 callers
Function
RenameLocalInFile
(filename string, file *hclwrite.File, fromAddress, toAddress *Address)
refactor/rename.go:84
↓ 1 callers
Function
RenameVariablePrefixInBody
(blockType string, body *hclwrite.Body, fromAddress, toAddress *Address)
refactor/rename.go:98
↓ 1 callers
Function
assertFileHasContents
(t *testing.T, expectedFile string, actualContents string)
refactor/mv_test.go:176
↓ 1 callers
Function
assertMockCmd
assertMockCmd is a high-level test helper to run a given mock command with arguments and check if an error and its stdout are expected.
cmd/mock.go:29
↓ 1 callers
Function
assertMockCmdFileOutput
assertMockCmd is a high-level test helper to run a given mock command with arguments and check if an error and its stdout are expected.
refactor/mv_test.go:144
↓ 1 callers
Function
fileNames
(vs []os.FileInfo)
refactor/mv_test.go:134
↓ 1 callers
Function
findBlocks
(b *hclwrite.Body, address *Address)
refactor/rename.go:109
↓ 1 callers
Function
min
(a, b int)
refactor/mv.go:128
↓ 1 callers
Function
mockErr
mockErr is a helper function which returns a string written to mocked err stream.
cmd/mock.go:59
↓ 1 callers
Function
mockOut
mockOut is a helper function which returns a string written to mocked out stream.
cmd/mock.go:64
↓ 1 callers
Function
moveAddrToFile
(addr *Address, parsedInFile, parsedOutFile *hclwrite.File)
refactor/mv.go:150
↓ 1 callers
Function
moveBlock
(addr *Address, parsedInFile, parsedOutFile *hclwrite.File)
refactor/mv.go:135
↓ 1 callers
Function
moveLocal
(localName string, parsedInFile, parsedOutFile *hclwrite.File)
refactor/mv.go:100
↓ 1 callers
Function
moveLocals
(parsedInFile, parsedOutFile *hclwrite.File)
refactor/mv.go:82
↓ 1 callers
Function
newDocCmd
()
cmd/doc.go:12
↓ 1 callers
Function
newMockCmd
newMockCmd is a helper function which returns a *cobra.Command whose in/out/err streams are mocked for testing.
cmd/mock.go:15
↓ 1 callers
Function
newMvCmd
()
cmd/mv.go:16
↓ 1 callers
Function
newRenameCmd
()
cmd/rename.go:17
↓ 1 callers
Function
runMockCmd
runMockCmd is a helper function which parses flags and invokes a given mock command.
cmd/mock.go:49
Function
TestMv
(t *testing.T)
refactor/mv_test.go:16
Function
TestTfRenameWithReferencesFilter
(t *testing.T)
refactor/rename_test.go:7
Function
TestVersion
(t *testing.T)
cmd/version_test.go:7
Function
copyFile
(src string, dest string)
refactor/mv_test.go:114
Function
init
()
cmd/rename.go:13
Function
init
()
cmd/doc.go:8
Function
init
()
cmd/root.go:17
Function
init
()
cmd/mv.go:12
Function
init
()
cmd/version.go:13
Function
labelsEqual
(a, b []string)
refactor/mv.go:116
Function
main
()
main.go:5
Function
runDocCmd
(cmd *cobra.Command, args []string)
cmd/doc.go:20
Function
runMvCmd
(cmd *cobra.Command, args []string)
cmd/mv.go:36
Function
runRenameCmd
(cmd *cobra.Command, args []string)
cmd/rename.go:42
Function
runVersionCmd
(cmd *cobra.Command, args []string)
cmd/version.go:25
Function
writeParsedFile
(parsedFile *hclwrite.File, toFile string)
refactor/mv.go:78