id: 1 unit: func CatchAllHandler() file: pkg/mock/handlers/handlers.go start line: 46 end line: 115 size: 51 LOC McCabe index: 11 number of parameters: 2 id: 2 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: 3 unit: func NewCmd() file: pkg/cmd/root/root.go start line: 67 end line: 108 size: 33 LOC McCabe index: 2 number of parameters: 0 id: 4 unit: func LoadConfigForRoot() file: pkg/config/config.go start line: 95 end line: 138 size: 30 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 GenerateToken() file: pkg/mock/imdsv2/tokengenerator.go start line: 44 end line: 75 size: 28 LOC McCabe index: 4 number of parameters: 2 id: 7 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: 8 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: 9 unit: func getHandlerPairs() file: pkg/cmd/cmdutil/cmdutil.go start line: 100 end line: 131 size: 26 LOC McCabe index: 4 number of parameters: 2 id: 10 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: 11 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: 12 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: 13 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: 14 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: 15 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: 16 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: 17 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: 18 unit: func formatRoutes() file: pkg/mock/handlers/handlers.go start line: 141 end line: 164 size: 20 LOC McCabe index: 5 number of parameters: 0 id: 19 unit: func WriteConfigToFile() file: pkg/config/config.go start line: 53 end line: 74 size: 19 LOC McCabe index: 4 number of parameters: 0 id: 20 unit: func ListRoutesHandler() file: pkg/mock/handlers/handlers.go start line: 118 end line: 139 size: 19 LOC McCabe index: 6 number of parameters: 2 id: 21 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: 22 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: 23 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: 24 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: 25 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: 26 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: 27 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: 28 unit: func createDir() file: pkg/config/config.go start line: 77 end line: 92 size: 13 LOC McCabe index: 4 number of parameters: 1 id: 29 unit: func PrintFlags() file: pkg/cmd/cmdutil/cmdutil.go start line: 55 end line: 68 size: 13 LOC McCabe index: 3 number of parameters: 1 id: 30 unit: func RegisterHandlers() file: pkg/cmd/cmdutil/cmdutil.go start line: 82 end line: 97 size: 13 LOC McCabe index: 3 number of parameters: 2 id: 31 unit: func FormatAndReturnJSONResponse() file: pkg/server/httpserver.go start line: 102 end line: 113 size: 11 LOC McCabe index: 2 number of parameters: 2 id: 32 unit: func FormatAndReturnJSONTextResponse() file: pkg/server/httpserver.go start line: 124 end line: 134 size: 11 LOC McCabe index: 2 number of parameters: 2 id: 33 unit: func validateConfig() file: pkg/cmd/root/root.go start line: 152 end line: 166 size: 11 LOC McCabe index: 3 number of parameters: 0 id: 34 unit: func listRoutes() file: pkg/server/httpserver.go start line: 81 end line: 90 size: 10 LOC McCabe index: 2 number of parameters: 0 id: 35 unit: func injectViperConfig() file: pkg/cmd/root/root.go start line: 120 end line: 130 size: 9 LOC McCabe index: 2 number of parameters: 0 id: 36 unit: func ValidateRFC3339TimeFormat() file: pkg/cmd/cmdutil/cmdutil.go start line: 71 end line: 79 size: 9 LOC McCabe index: 2 number of parameters: 2 id: 37 unit: func getHomeDir() file: pkg/config/config.go start line: 43 end line: 50 size: 8 LOC McCabe index: 2 number of parameters: 0 id: 38 unit: func trailingSlashMiddleware() file: pkg/server/httpserver.go start line: 155 end line: 163 size: 8 LOC McCabe index: 3 number of parameters: 1 id: 39 unit: func Contains() file: pkg/cmd/cmdutil/cmdutil.go start line: 45 end line: 52 size: 8 LOC McCabe index: 3 number of parameters: 2 id: 40 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: 41 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: 42 unit: func ListenAndServe() file: pkg/server/httpserver.go start line: 93 end line: 99 size: 7 LOC McCabe index: 2 number of parameters: 2 id: 43 unit: func setupAndSaveConfig() file: pkg/cmd/root/root.go start line: 110 end line: 117 size: 7 LOC McCabe index: 2 number of parameters: 2 id: 44 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: 45 unit: func FormatAndReturnTextResponse() file: pkg/server/httpserver.go start line: 116 end line: 121 size: 6 LOC McCabe index: 1 number of parameters: 2 id: 46 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: 47 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: 48 unit: func preRun() file: pkg/cmd/root/root.go start line: 145 end line: 150 size: 6 LOC McCabe index: 2 number of parameters: 2 id: 49 unit: func run() file: pkg/cmd/root/root.go start line: 168 end line: 173 size: 6 LOC McCabe index: 1 number of parameters: 2 id: 50 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: 51 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: 52 unit: func main() file: cmd/amazon-ec2-metadata-mock.go start line: 22 end line: 27 size: 6 LOC McCabe index: 2 number of parameters: 0 id: 53 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: 54 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: 55 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: 56 unit: func Mock() file: pkg/mock/root/root.go start line: 24 end line: 31 size: 5 LOC McCabe index: 1 number of parameters: 1 id: 57 unit: func saveConfigToFile() file: pkg/cmd/root/root.go start line: 133 end line: 137 size: 5 LOC McCabe index: 2 number of parameters: 0 id: 58 unit: func setConfig() file: pkg/cmd/root/root.go start line: 139 end line: 143 size: 5 LOC McCabe index: 1 number of parameters: 1 id: 59 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: 60 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: 61 unit: func ReturnNotFoundResponse() file: pkg/server/httpserver.go start line: 137 end line: 140 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 62 unit: func ReturnBadRequestResponse() file: pkg/server/httpserver.go start line: 143 end line: 146 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 63 unit: func ReturnUnauthorizedResponse() file: pkg/server/httpserver.go start line: 149 end line: 152 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 64 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: 65 unit: func init() file: pkg/cmd/root/root.go start line: 57 end line: 60 size: 4 LOC McCabe index: 1 number of parameters: 0 id: 66 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: 67 unit: func() file: pkg/error/error.go start line: 28 end line: 30 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 68 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: 69 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: 70 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: 71 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: 72 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: 73 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: 74 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: 75 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: 76 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: 77 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: 78 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: 79 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: 80 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: 81 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: 82 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: 83 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: 84 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: 85 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: 86 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: 87 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: 88 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 id: 89 unit: func GetTopLevelFlags() file: pkg/cmd/root/globalflags/globalflags.go start line: 50 end line: 52 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 90 unit: func initializeConfig() file: pkg/cmd/root/root.go start line: 62 end line: 64 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 91 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: 92 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