Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PioneerIncubator/betterGo
/ functions
Functions
71 in github.com/PioneerIncubator/betterGo
⨍
Functions
71
◇
Types & classes
0
↓ 11 callers
Function
GetExprStr
(fset *token.FileSet, expr interface{})
translator/expr.go:87
↓ 5 callers
Function
GetBasicLitType
(expr *ast.BasicLit)
translator/var.go:56
↓ 5 callers
Function
reflectType
(fset *token.FileSet, arg interface{})
translator/var.go:94
↓ 3 callers
Function
DecorateParamName
(name string)
translator/parse_fun.go:43
↓ 3 callers
Function
ExtractParamsTypeAndName
(fset *token.FileSet, listOfArgs []ast.Expr)
translator/expr.go:14
↓ 3 callers
Function
Reduce
Reduce computes the reduction of the pair function across the elements of the slice. (If the types of the slice and function do not correspond, Reduce
enum/reduce.go:19
↓ 2 callers
Function
Delete
(slice, anonymousFunc interface{})
enum/delete.go:9
↓ 2 callers
Function
Find
(slice, anonymousFunc interface{})
enum/find.go:9
↓ 2 callers
Function
GenCallExpr
Generate function calling statement by funName and arguments
fileoperations/replace.go:16
↓ 2 callers
Function
GetAssertType
()
translator/var.go:23
↓ 2 callers
Function
Max
(slice interface{})
enum/max.go:9
↓ 2 callers
Function
Min
(slice interface{})
enum/min.go:9
↓ 2 callers
Function
ReplaceOriginFuncByFile
(file, origin, target string)
fileoperations/replace.go:39
↓ 2 callers
Function
Sum
(slice interface{})
enum/sum.go:9
↓ 2 callers
Function
checkFileExists
(filePath string)
fileoperations/genFunc.go:16
↓ 2 callers
Function
loopASTNode
func isFunction() { }
main.go:65
↓ 2 callers
Function
readFile
Read the file line by line to match origin and replace by target
fileoperations/replace.go:104
↓ 2 callers
Function
replaceOriginFunc
(fset *token.FileSet, ret *ast.CallExpr, callFunExpr, newFunName, filePath string, isDir bool)
main.go:19
↓ 2 callers
Function
testMap
(origin, expect []int, fn func(int) int)
test/map/map.go:20
↓ 2 callers
Function
writeCallExprToFile
Write target function calling statement to the file
fileoperations/replace.go:147
↓ 1 callers
Function
Add
(a, b interface{})
enum/add.go:7
↓ 1 callers
Function
CheckFuncExists
(filePath string, listOfArgTypes []string)
fileoperations/genFunc.go:23
↓ 1 callers
Function
GenEnumFunctionDecl
(fset *token.FileSet, funName string, listOfArgs []ast.Expr)
translator/gen_fun_call.go:134
↓ 1 callers
Function
GetFuncType
(fset *token.FileSet, ret *ast.FuncDecl)
translator/parse_fun.go:63
↓ 1 callers
Function
IncrementString
(str string, separator string, first int)
utils/utils.go:10
↓ 1 callers
Function
Map
(slice, anonymousFunc interface{})
enum/map.go:9
↓ 1 callers
Function
RecordAssertType
(input string)
translator/var.go:15
↓ 1 callers
Function
RecordAssignVarType
(fset *token.FileSet, ret *ast.AssignStmt)
translator/var.go:27
↓ 1 callers
Function
RecordDeclVarType
(fset *token.FileSet, ret *ast.ValueSpec)
translator/var.go:70
↓ 1 callers
Function
ReplaceOriginFuncByDir
(path, origin, target string)
fileoperations/replace.go:71
↓ 1 callers
Function
TestDeleteInts
()
test/delete/delete.go:24
↓ 1 callers
Function
TestDeleteStrings
()
test/delete/delete.go:14
↓ 1 callers
Function
TestFindInts
()
test/find/find.go:24
↓ 1 callers
Function
TestFindStrings
()
test/find/find.go:14
↓ 1 callers
Function
TestMaxFloats
()
test/max/max.go:18
↓ 1 callers
Function
TestMaxInts
()
test/max/max.go:8
↓ 1 callers
Function
TestMinFloats
()
test/min/min.go:19
↓ 1 callers
Function
TestMinInts
()
test/min/min.go:9
↓ 1 callers
Function
TestSumFloats
()
test/sum/sum.go:19
↓ 1 callers
Function
TestSumInts
()
test/sum/sum.go:9
↓ 1 callers
Function
WriteFuncToFile
(filePath, packageName string, input []byte)
fileoperations/genFunc.go:137
↓ 1 callers
Function
ensureDirExists
(filePath string)
fileoperations/genFunc.go:103
↓ 1 callers
Function
ensureFileExists
(filePath string)
fileoperations/genFunc.go:116
↓ 1 callers
Function
extractParamsName
(listOfArgs []ast.Expr)
translator/gen_fun_call.go:10
↓ 1 callers
Function
genFunctionBody
func Reduce(argname_1 []int, argname_2 func (int, int, string)int, argname_3 int) int
translator/gen_fun_call.go:24
↓ 1 callers
Function
genTargetFuncImplement
(fset *token.FileSet, ret *ast.CallExpr, callFunExpr, funDeclStr string)
main.go:36
↓ 1 callers
Function
getFiles
(path string)
fileoperations/replace.go:170
↓ 1 callers
Function
getFunParamListRawStr
(fset *token.FileSet, ret *ast.FuncDecl)
translator/parse_fun.go:10
↓ 1 callers
Function
getFunRetListRawStr
(fset *token.FileSet, ret *ast.FuncDecl)
translator/parse_fun.go:23
↓ 1 callers
Function
getFuncNameFromLine
(line []byte)
fileoperations/genFunc.go:91
↓ 1 callers
Function
goodFunc
goodFunc verifies that the function satisfies the signature, represented as a slice of types. The last type is the single result type; the others are
enum/util.go:8
↓ 1 callers
Function
loopASTDir
(filePath string, rewriteAndGen bool)
main.go:150
↓ 1 callers
Function
loopASTFile
(filePath string, rewriteAndGen bool)
main.go:138
↓ 1 callers
Function
matchFunc
(filePath, origin string)
fileoperations/genFunc.go:59
↓ 1 callers
Function
recordParamType
(fset *token.FileSet, ret *ast.FuncType)
translator/parse_fun.go:47
↓ 1 callers
Function
replaceOriginImport
(file, origin, target string)
fileoperations/replace.go:81
↓ 1 callers
Function
testINT
()
test/reduce/main.go:14
Function
TestReduce
(t *testing.T)
enum/reduce_test.go:11
Function
main
()
main.go:167
Function
main
()
test/reduce/main.go:31
Function
main
()
test/min/min.go:29
Function
main
()
test/sum/sum.go:29
Function
main
()
test/delete/delete.go:9
Function
main
()
test/map/map.go:37
Function
main
()
test/max/max.go:27
Function
main
()
test/find/find.go:9
Function
mul
(a, b int)
test/reduce/main.go:9
Function
mul
(a, b int)
enum/reduce_test.go:7
Function
randomFn
(origin int)
test/map/map.go:9
Function
useAdd
()
test/add.go:9
Function
varTestFn
(origin int)
test/map/map.go:15