id: 1 unit: func CatchAllHandler() file: pkg/mock/handlers/handlers.go start line: 48 end line: 116 size: 51 LOC McCabe index: 10 number of parameters: 2 id: 2 unit: func NewCmd() file: pkg/cmd/root/root.go start line: 73 end line: 117 size: 36 LOC McCabe index: 2 number of parameters: 0 id: 3 unit: func Handler() file: pkg/mock/events/events.go start line: 50 end line: 91 size: 34 LOC McCabe index: 7 number of parameters: 2 id: 4 unit: func LoadConfigForRoot() file: pkg/config/config.go start line: 94 end line: 138 size: 31 LOC McCabe index: 6 number of parameters: 2 id: 5 unit: func handleSpotITN() file: pkg/mock/spot/spot.go start line: 74 end line: 105 size: 30 LOC McCabe index: 7 number of parameters: 2 id: 6 unit: func getHandlerPairs() file: pkg/cmd/cmdutil/cmdutil.go start line: 103 end line: 138 size: 30 LOC McCabe index: 5 number of parameters: 2 id: 7 unit: func RegisterHandlers() file: pkg/mock/userdata/userdata.go start line: 50 end line: 83 size: 28 LOC McCabe index: 7 number of parameters: 1 id: 8 unit: func GenerateToken() file: pkg/mock/imdsv2/tokengenerator.go start line: 44 end line: 75 size: 28 LOC McCabe index: 4 number of parameters: 2 id: 9 unit: func ValidateLocalConfig() file: pkg/cmd/events/events.go start line: 127 end line: 160 size: 28 LOC McCabe index: 6 number of parameters: 0 id: 10 unit: func ValidateToken() file: pkg/mock/imdsv2/tokenvalidator.go start line: 29 end line: 56 size: 27 LOC McCabe index: 4 number of parameters: 1 id: 11 unit: func formatRoutes() file: pkg/mock/handlers/handlers.go start line: 144 end line: 177 size: 27 LOC McCabe index: 8 number of parameters: 0 id: 12 unit: func handleRebalance() file: pkg/mock/spot/spot.go start line: 107 end line: 132 size: 25 LOC McCabe index: 5 number of parameters: 2 id: 13 unit: func RegisterHandlers() file: pkg/mock/static/static.go start line: 59 end line: 87 size: 23 LOC McCabe index: 6 number of parameters: 1 id: 14 unit: func SetMetadataDefaults() file: pkg/config/metadata.go start line: 105 end line: 135 size: 22 LOC McCabe index: 5 number of parameters: 1 id: 15 unit: func SetDynamicDefaults() file: pkg/config/dynamic.go start line: 61 end line: 91 size: 22 LOC McCabe index: 5 number of parameters: 1 id: 16 unit: func RegisterHandlers() file: pkg/mock/dynamic/dynamic.go start line: 59 end line: 85 size: 22 LOC McCabe index: 6 number of parameters: 1 id: 17 unit: func ValidateLocalConfig() file: pkg/cmd/spot/spot.go start line: 102 end line: 127 size: 22 LOC McCabe index: 6 number of parameters: 0 id: 18 unit: func ListRoutesHandler() file: pkg/mock/handlers/handlers.go start line: 119 end line: 142 size: 21 LOC McCabe index: 7 number of parameters: 2 id: 19 unit: func overrideMetadataPathsWithPlaceholders() file: pkg/config/config.go start line: 188 end line: 215 size: 20 LOC McCabe index: 5 number of parameters: 0 id: 20 unit: func handleASGTargetLifecycleState() file: pkg/mock/asglifecycle/asglifecycle.go start line: 69 end line: 89 size: 20 LOC McCabe index: 5 number of parameters: 2 id: 21 unit: func Handler() file: pkg/mock/spot/spot.go start line: 51 end line: 72 size: 20 LOC McCabe index: 6 number of parameters: 2 id: 22 unit: func removeIndentFromLists() file: pkg/server/httpserver.go start line: 184 end line: 213 size: 20 LOC McCabe index: 4 number of parameters: 1 id: 23 unit: func WriteConfigToFile() file: pkg/config/config.go start line: 52 end line: 73 size: 19 LOC McCabe index: 4 number of parameters: 0 id: 24 unit: func setupAndSaveConfig() file: pkg/cmd/root/root.go start line: 119 end line: 139 size: 19 LOC McCabe index: 4 number of parameters: 2 id: 25 unit: func Handler() file: pkg/mock/static/static.go start line: 36 end line: 56 size: 18 LOC McCabe index: 4 number of parameters: 2 id: 26 unit: func Handler() file: pkg/mock/asglifecycle/asglifecycle.go start line: 48 end line: 67 size: 18 LOC McCabe index: 5 number of parameters: 2 id: 27 unit: func Handler() file: pkg/mock/dynamic/dynamic.go start line: 36 end line: 56 size: 18 LOC McCabe index: 4 number of parameters: 2 id: 28 unit: func newCmd() file: pkg/cmd/events/events.go start line: 91 end line: 112 size: 18 LOC McCabe index: 1 number of parameters: 0 id: 29 unit: func unmarshalToNestedStruct() file: pkg/config/metadata.go start line: 148 end line: 166 size: 17 LOC McCabe index: 5 number of parameters: 2 id: 30 unit: func getMetadata() file: pkg/mock/events/events.go start line: 93 end line: 111 size: 17 LOC McCabe index: 1 number of parameters: 0 id: 31 unit: func SetUserdataDefaults() file: pkg/config/userdata.go start line: 53 end line: 75 size: 16 LOC McCabe index: 3 number of parameters: 1 id: 32 unit: func newCmd() file: pkg/cmd/spot/spot.go start line: 68 end line: 87 size: 16 LOC McCabe index: 1 number of parameters: 0 id: 33 unit: func extractValidTTL() file: pkg/mock/imdsv2/tokengenerator.go start line: 77 end line: 94 size: 15 LOC McCabe index: 4 number of parameters: 1 id: 34 unit: func RegisterHandlers() file: pkg/cmd/cmdutil/cmdutil.go start line: 84 end line: 100 size: 14 LOC McCabe index: 3 number of parameters: 2 id: 35 unit: func createDir() file: pkg/config/config.go start line: 76 end line: 91 size: 13 LOC McCabe index: 4 number of parameters: 1 id: 36 unit: func PrintFlags() file: pkg/cmd/cmdutil/cmdutil.go start line: 57 end line: 70 size: 13 LOC McCabe index: 3 number of parameters: 1 id: 37 unit: func newCmd() file: pkg/cmd/asglifecycle/asglifecycle.go start line: 52 end line: 66 size: 13 LOC McCabe index: 1 number of parameters: 0 id: 38 unit: func trimAndSortRoutes() file: pkg/mock/handlers/handlers.go start line: 196 end line: 209 size: 12 LOC McCabe index: 3 number of parameters: 1 id: 39 unit: func FormatAndReturnJSONResponse() file: pkg/server/httpserver.go start line: 107 end line: 122 size: 12 LOC McCabe index: 2 number of parameters: 2 id: 40 unit: func validateConfig() file: pkg/cmd/root/root.go start line: 175 end line: 190 size: 12 LOC McCabe index: 3 number of parameters: 0 id: 41 unit: func FormatAndReturnJSONTextResponse() file: pkg/server/httpserver.go start line: 141 end line: 151 size: 11 LOC McCabe index: 2 number of parameters: 2 id: 42 unit: func listRoutes() file: pkg/server/httpserver.go start line: 86 end line: 95 size: 10 LOC McCabe index: 2 number of parameters: 0 id: 43 unit: func Handler() file: pkg/mock/userdata/userdata.go start line: 36 end line: 47 size: 9 LOC McCabe index: 2 number of parameters: 2 id: 44 unit: func injectViperConfig() file: pkg/cmd/root/root.go start line: 142 end line: 152 size: 9 LOC McCabe index: 2 number of parameters: 0 id: 45 unit: func ValidateRFC3339TimeFormat() file: pkg/cmd/cmdutil/cmdutil.go start line: 73 end line: 81 size: 9 LOC McCabe index: 2 number of parameters: 2 id: 46 unit: func getHomeDir() file: pkg/config/config.go start line: 42 end line: 49 size: 8 LOC McCabe index: 2 number of parameters: 0 id: 47 unit: func trailingSlashMiddleware() file: pkg/server/httpserver.go start line: 172 end line: 180 size: 8 LOC McCabe index: 3 number of parameters: 1 id: 48 unit: func Contains() file: pkg/cmd/cmdutil/cmdutil.go start line: 47 end line: 54 size: 8 LOC McCabe index: 3 number of parameters: 2 id: 49 unit: func BindTopLevelGFlags() file: pkg/config/config.go start line: 165 end line: 171 size: 7 LOC McCabe index: 3 number of parameters: 1 id: 50 unit: func BindFlagSetWithKeyPrefix() file: pkg/config/config.go start line: 174 end line: 180 size: 7 LOC McCabe index: 2 number of parameters: 2 id: 51 unit: func trimRoute() file: pkg/mock/handlers/handlers.go start line: 179 end line: 186 size: 7 LOC McCabe index: 2 number of parameters: 1 id: 52 unit: func ListenAndServe() file: pkg/server/httpserver.go start line: 98 end line: 104 size: 7 LOC McCabe index: 2 number of parameters: 2 id: 53 unit: func Mock() file: pkg/mock/root/root.go start line: 25 end line: 33 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 54 unit: func stringCut() file: pkg/mock/handlers/handlers.go start line: 189 end line: 194 size: 6 LOC McCabe index: 2 number of parameters: 2 id: 55 unit: func getInstanceActionResponse() file: pkg/mock/spot/spot.go start line: 134 end line: 139 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 56 unit: func NewSwapper() file: pkg/server/swapper.go start line: 19 end line: 24 size: 6 LOC McCabe index: 1 number of parameters: 0 id: 57 unit: func() file: pkg/server/swapper.go start line: 56 end line: 61 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 58 unit: func FormatAndReturnTextResponse() file: pkg/server/httpserver.go start line: 125 end line: 130 size: 6 LOC McCabe index: 1 number of parameters: 2 id: 59 unit: func FormatAndReturnOctetResponse() file: pkg/server/httpserver.go start line: 133 end line: 138 size: 6 LOC McCabe index: 1 number of parameters: 2 id: 60 unit: func setConfig() file: pkg/cmd/root/root.go start line: 161 end line: 166 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 61 unit: func preRun() file: pkg/cmd/root/root.go start line: 168 end line: 173 size: 6 LOC McCabe index: 2 number of parameters: 2 id: 62 unit: func run() file: pkg/cmd/root/root.go start line: 192 end line: 197 size: 6 LOC McCabe index: 1 number of parameters: 2 id: 63 unit: func preRun() file: pkg/cmd/asglifecycle/asglifecycle.go start line: 73 end line: 78 size: 6 LOC McCabe index: 2 number of parameters: 2 id: 64 unit: func run() file: pkg/cmd/asglifecycle/asglifecycle.go start line: 86 end line: 91 size: 6 LOC McCabe index: 1 number of parameters: 2 id: 65 unit: func preRun() file: pkg/cmd/spot/spot.go start line: 94 end line: 99 size: 6 LOC McCabe index: 2 number of parameters: 2 id: 66 unit: func run() file: pkg/cmd/spot/spot.go start line: 129 end line: 134 size: 6 LOC McCabe index: 1 number of parameters: 2 id: 67 unit: func preRun() file: pkg/cmd/events/events.go start line: 119 end line: 124 size: 6 LOC McCabe index: 2 number of parameters: 2 id: 68 unit: func run() file: pkg/cmd/events/events.go start line: 162 end line: 167 size: 6 LOC McCabe index: 1 number of parameters: 2 id: 69 unit: func main() file: cmd/ec2-metadata-mock/main.go start line: 22 end line: 27 size: 6 LOC McCabe index: 2 number of parameters: 0 id: 70 unit: func LoadConfigFromDefaults() file: pkg/config/config.go start line: 141 end line: 145 size: 5 LOC McCabe index: 2 number of parameters: 1 id: 71 unit: func BindFlagSet() file: pkg/config/config.go start line: 158 end line: 162 size: 5 LOC McCabe index: 2 number of parameters: 1 id: 72 unit: func bindFlagWithKeyPrefix() file: pkg/config/config.go start line: 182 end line: 186 size: 5 LOC McCabe index: 2 number of parameters: 2 id: 73 unit: func() file: pkg/server/swapper.go start line: 26 end line: 30 size: 5 LOC McCabe index: 1 number of parameters: 1 id: 74 unit: func() file: pkg/server/swapper.go start line: 32 end line: 36 size: 5 LOC McCabe index: 1 number of parameters: 1 id: 75 unit: func() file: pkg/server/swapper.go start line: 38 end line: 42 size: 5 LOC McCabe index: 1 number of parameters: 1 id: 76 unit: func() file: pkg/server/swapper.go start line: 44 end line: 48 size: 5 LOC McCabe index: 1 number of parameters: 1 id: 77 unit: func() file: pkg/server/swapper.go start line: 50 end line: 54 size: 5 LOC McCabe index: 1 number of parameters: 1 id: 78 unit: func saveConfigToFile() file: pkg/cmd/root/root.go start line: 155 end line: 159 size: 5 LOC McCabe index: 2 number of parameters: 0 id: 79 unit: func Mock() file: pkg/mock/asglifecycle/asglifecycle.go start line: 37 end line: 40 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 80 unit: func Mock() file: pkg/mock/spot/spot.go start line: 40 end line: 43 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 81 unit: func Mock() file: pkg/mock/events/events.go start line: 39 end line: 42 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 82 unit: func ReturnNotFoundResponse() file: pkg/server/httpserver.go start line: 154 end line: 157 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 83 unit: func ReturnBadRequestResponse() file: pkg/server/httpserver.go start line: 160 end line: 163 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 84 unit: func ReturnUnauthorizedResponse() file: pkg/server/httpserver.go start line: 166 end line: 169 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 85 unit: func init() file: pkg/cmd/root/root.go start line: 63 end line: 66 size: 4 LOC McCabe index: 1 number of parameters: 0 id: 86 unit: func init() file: pkg/cmd/asglifecycle/asglifecycle.go start line: 43 end line: 46 size: 4 LOC McCabe index: 1 number of parameters: 0 id: 87 unit: func init() file: pkg/cmd/spot/spot.go start line: 59 end line: 62 size: 4 LOC McCabe index: 1 number of parameters: 0 id: 88 unit: func init() file: pkg/cmd/events/events.go start line: 82 end line: 85 size: 4 LOC McCabe index: 1 number of parameters: 0 id: 89 unit: func GetCfgMdValPrefix() file: pkg/config/metadata.go start line: 90 end line: 92 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 90 unit: func GetCfgMdPathsPrefix() file: pkg/config/metadata.go start line: 95 end line: 97 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 91 unit: func BindMetadataCfg() file: pkg/config/metadata.go start line: 100 end line: 102 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 92 unit: func GetMetadataDefaults() file: pkg/config/metadata.go start line: 138 end line: 140 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 93 unit: func GetMetadataValueToPlaceholderPathsKeyMap() file: pkg/config/metadata.go start line: 143 end line: 145 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 94 unit: func GetCfgDnValPrefix() file: pkg/config/dynamic.go start line: 46 end line: 48 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 95 unit: func GetCfgDnPathsPrefix() file: pkg/config/dynamic.go start line: 51 end line: 53 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 96 unit: func BindDynamicCfg() file: pkg/config/dynamic.go start line: 56 end line: 58 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 97 unit: func GetDynamicDefaults() file: pkg/config/dynamic.go start line: 94 end line: 96 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 98 unit: func GetDynamicValueToPlaceholderPathsKeyMap() file: pkg/config/dynamic.go start line: 99 end line: 101 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 99 unit: func BindServerCfg() file: pkg/config/server.go start line: 29 end line: 31 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 100 unit: func SetServerCfgDefaults() file: pkg/config/server.go start line: 34 end line: 36 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 101 unit: func GetCfgUdValPrefix() file: pkg/config/userdata.go start line: 38 end line: 40 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 102 unit: func GetCfgUdPathsPrefix() file: pkg/config/userdata.go start line: 43 end line: 45 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 103 unit: func BindUserdataCfg() file: pkg/config/userdata.go start line: 48 end line: 50 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 104 unit: func GetUserdataDefaults() file: pkg/config/userdata.go start line: 78 end line: 80 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 105 unit: func GetUserdataValueToPlaceholderPathsKeyMap() file: pkg/config/userdata.go start line: 83 end line: 85 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 106 unit: func GetDefaultCfgFileName() file: pkg/config/config.go start line: 148 end line: 150 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 107 unit: func GetSavedCfgFileName() file: pkg/config/config.go start line: 153 end line: 155 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 108 unit: func GetDefaultValues() file: pkg/config/defaults/defaults.go start line: 25 end line: 27 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 109 unit: func SetConfig() file: pkg/mock/asglifecycle/asglifecycle.go start line: 43 end line: 45 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 110 unit: func SetConfig() file: pkg/mock/spot/spot.go start line: 46 end line: 48 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 111 unit: func SetConfig() file: pkg/mock/events/events.go start line: 45 end line: 47 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 112 unit: func() file: pkg/error/error.go start line: 28 end line: 30 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 113 unit: func HandleFunc() file: pkg/server/httpserver.go start line: 72 end line: 74 size: 3 LOC McCabe index: 1 number of parameters: 2 id: 114 unit: func HandleFuncPrefix() file: pkg/server/httpserver.go start line: 77 end line: 79 size: 3 LOC McCabe index: 1 number of parameters: 2 id: 115 unit: func Reset() file: pkg/server/httpserver.go start line: 82 end line: 84 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 116 unit: func GetTopLevelFlags() file: pkg/cmd/root/globalflags/globalflags.go start line: 57 end line: 59 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 117 unit: func initializeConfig() file: pkg/cmd/root/root.go start line: 68 end line: 70 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 118 unit: func initConfig() file: pkg/cmd/asglifecycle/asglifecycle.go start line: 48 end line: 50 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 119 unit: func SetConfig() file: pkg/cmd/asglifecycle/asglifecycle.go start line: 69 end line: 71 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 120 unit: func ValidateLocalConfig() file: pkg/cmd/asglifecycle/asglifecycle.go start line: 81 end line: 84 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 121 unit: func initConfig() file: pkg/cmd/spot/spot.go start line: 64 end line: 66 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 122 unit: func SetConfig() file: pkg/cmd/spot/spot.go start line: 90 end line: 92 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 123 unit: func initConfig() file: pkg/cmd/events/events.go start line: 87 end line: 89 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 124 unit: func SetConfig() file: pkg/cmd/events/events.go start line: 115 end line: 117 size: 3 LOC McCabe index: 1 number of parameters: 1