Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alistanis/st
/ functions
Functions
62 in github.com/alistanis/st
⨍
Functions
62
◇
Types & classes
10
↓ 14 callers
Function
ProcessBytes
ProcessBytes takes a []byte and filename, and inspects the data, returning that data in another []byte
parse/parse.go:191
↓ 12 callers
Function
SetArgs
SetArgs clears flags and sets os.Args to os.Args[0] (program name) and then to the list of whatever parameters are given after
parse/flags.go:133
↓ 11 callers
Function
CamelCase
CamelCase converts a string to the CamelCase version of it
parse/parse.go:413
↓ 10 callers
Function
Flags
Flags sets up command line bindings, calls flagParse(), and calls verify() to check command line flags
parse/flags.go:72
↓ 9 callers
Function
DefaultOptions
DefaultOptions returns a new *Options with all default values initialized
parse/parse.go:118
↓ 8 callers
Function
SetOptions
SetOptions sets the current options to the options provided. (This is not thread safe if called from a goroutine)
parse/parse.go:131
↓ 5 callers
Function
processStructTagRequest
(req *http.Request)
net/handlers.go:22
↓ 4 callers
Function
AndProcessFiles
AndProcessFiles takes a list of paths, iterates over them, stats them, and then inspects source files
parse/parse.go:148
↓ 4 callers
Function
run
()
main.go:27
↓ 3 callers
Method
Args
Args returns the underlying FlagSet.Args()
parse/parse.go:96
↓ 3 callers
Function
ProcessFile
ProcessFile processes a file, returning the processed []byte
parse/parse.go:207
↓ 3 callers
Function
exit
(code int)
main.go:19
↓ 2 callers
Function
Insert
Insert inserts insertData into data at the given start index
parse/parse.go:363
↓ 2 callers
Function
Inspect
Inspect visits all nodes in the *ast.File (recursively), performing mutations on the buffer when the type found is an *ast.StructType
parse/parse.go:226
↓ 2 callers
Function
Parse
Parse returns an *ast.File, the data parsed, and an error
parse/parse.go:200
↓ 2 callers
Function
Printf
Printf prints a string depending on verbosity... should be in a debug package?
sterrors/sterrors.go:22
↓ 2 callers
Function
Process
Process iterates over a []*File, processes the *Files, and returns the resulting []*File and the last error that occurred, if any This function could
parse/parse.go:175
↓ 2 callers
Function
ServeMux
()
net/listener.go:9
↓ 2 callers
Function
removeIndex
removeIndex removes a single index from a string
parse/parse.go:368
↓ 1 callers
Function
AppendStructTag
AppendStructTag adds an additional tag to a struct tag
parse/parse.go:293
↓ 1 callers
Function
DeleteRange
DeleteRange deletes a range from a []byte, returning the new slice
parse/parse.go:358
↓ 1 callers
Function
ErrMutuallyExclusiveParameters
ErrMutuallyExclusiveParameters takes two inputs and returns a canned error response
sterrors/sterrors.go:17
↓ 1 callers
Function
FormatFieldName
FormatFieldName formats the field name as either CamelCase or snake_case
parse/parse.go:373
↓ 1 callers
Function
FormatHTTPError
(err error, code int)
sterrors/sterrors.go:33
↓ 1 callers
Function
IsIgnoredField
IsIgnoredField checks if a field is an explicitly ignored field Currently a slice is fine for performance, but we will replace these with maps later.
parse/parse.go:338
↓ 1 callers
Function
IsIgnoredTypeName
IsIgnoredTypeName checks if the name provided is an ignored struct
parse/parse.go:348
↓ 1 callers
Function
NewCommentDirective
NewCommentDirective takes a string (which should be the text from an *ast.Comment), creates a new flag set using the comment as the flag set name with
parse/parse.go:109
↓ 1 callers
Function
OverwriteStructTag
OverwriteStructTag overwrites the struct tag completely
parse/parse.go:301
↓ 1 callers
Function
ResetFlags
ResetFlags is a near copy of the flag.ResetForTesting(usage func()) function.
parse/flags.go:128
↓ 1 callers
Function
ServeHTTP
(mux *http.ServeMux)
net/listener.go:24
↓ 1 callers
Function
SetVars
SetVars sets up all command line variable bindings
parse/flags.go:65
↓ 1 callers
Function
TagStruct
TagStruct tags a struct based on whether or not it is exported, is ignored, and what flags are provided at runtime
parse/parse.go:252
↓ 1 callers
Function
Underscore
Underscore will change a string from a camelcased form to a string with underscores. Will change "::" to "/" to maintain compatibility with Rails's un
parse/parse.go:394
↓ 1 callers
Function
boolVars
boolVars sets up all boolean command line variable bindings
parse/flags.go:49
↓ 1 callers
Function
defaultExitFunc
(code int)
main.go:15
↓ 1 callers
Function
main
()
main.go:59
↓ 1 callers
Function
parseFile
parseFile reads all file information into a buffer, then creates a token set and parses the file, returning a *ast.File
parse/parse.go:216
↓ 1 callers
Function
stringVars
stringVars sets up all string command line variable bindings
parse/flags.go:39
↓ 1 callers
Function
usage
()
main.go:53
↓ 1 callers
Function
verify
()
parse/flags.go:78
Function
TestCamelCase
(t *testing.T)
parse/parse_test.go:145
Function
TestCamelCaseDashed
(t *testing.T)
parse/parse_test.go:440
Function
TestCamelCaseMixed
(t *testing.T)
parse/parse_test.go:450
Function
TestCamelCaseSpaced
(t *testing.T)
parse/parse_test.go:420
Function
TestCamelCaseUnderscored
(t *testing.T)
parse/parse_test.go:430
Function
TestCamelCased
Below taken from https://github.com/etgryphon/stringUp/blob/master/stringUp_test.go
parse/parse_test.go:410
Function
TestCrashingMain
This doesn't show up in GoConvey's test coverage, but it actually does allow for full and complete coverage os.Exit() is not a hookable call, and goco
main_test.go:93
Function
TestErrors
(t *testing.T)
sterrors/sterrors_test.go:28
Function
TestErrors
(t *testing.T)
parse/parse_test.go:351
Function
TestFiles
(t *testing.T)
parse/parse_test.go:212
Function
TestFlagErrors
(t *testing.T)
parse/flags_test.go:83
Function
TestFlags
(t *testing.T)
parse/flags_test.go:12
Function
TestGoGenerate
(t *testing.T)
parse/parse_test.go:335
Function
TestGoGenerateDetection
(t *testing.T)
parse/flags_test.go:65
Function
TestIgnore
(t *testing.T)
parse/parse_test.go:169
Function
TestListener
(t *testing.T)
net/listener_test.go:16
Function
TestRun
(t *testing.T)
main_test.go:40
Function
TestSnakeCase
(t *testing.T)
parse/parse_test.go:111
Function
TestStructTagHandler
(t *testing.T)
net/handlers_test.go:41
Function
init
()
main_test.go:31
Function
init
()
sterrors/sterrors_test.go:19
Function
init
()
parse/parse_test.go:102