MCPcopy Create free account

hub / github.com/ThreeDotsLabs/go-web-app-antipatterns / functions

Functions549 in github.com/ThreeDotsLabs/go-web-app-antipatterns

↓ 96 callersMethodPrintln
(args ...interface{})
03-cohesion/02-decorators/subscribe.go:12
↓ 53 callersMethodExecContext
(ctx context.Context, query string, args ...interface{})
04-transactions/05-tx-provider/repository.go:33
↓ 34 callersMethodQueryRowContext
(ctx context.Context, query string, args ...interface{})
04-transactions/05-tx-provider/repository.go:32
↓ 17 callersMethodHandle
(ctx context.Context, cmd C)
03-cohesion/03-generics/subscribe.go:8
↓ 11 callersMethodString
()
02-enums/04-structs/role/role.go:9
↓ 9 callersMethodInc
(key string, value int)
03-cohesion/02-decorators/subscribe.go:8
↓ 8 callersMethodEmail
()
04-transactions/05-tx-provider/models.go:31
↓ 8 callersMethodPostUser
Add a new user (POST /users)
01-coupling/03-loosely-coupled-generated/internal/http_server.go:21
↓ 7 callersMethodHandle
(ctx context.Context, cmd Subscribe)
03-cohesion/02-decorators/subscribe.go:21
↓ 6 callersMethodFirstName
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:52
↓ 6 callersMethodLastName
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:56
↓ 5 callersMethodGetAllUsers
()
01-coupling/tests/client.go:55
↓ 5 callersMethodGetUser
Get a single user (GET /users/{userID})
01-coupling/03-loosely-coupled-generated/internal/http_server.go:27
↓ 5 callersMethodUpdateByID
(ctx context.Context, userID int, updateFn func(user *User) (bool, error))
04-transactions/04-update-func-closure/app.go:17
↓ 5 callersFunctionfindUserByEmail
(users []User, emailToFind string)
01-coupling/tests/end_to_end_test.go:279
↓ 5 callersMethodrelativeURL
(path string)
01-coupling/tests/client.go:142
↓ 4 callersMethodAddDiscount
(ctx context.Context, userID int, discount int)
05-distributed-transactions/01-distributed-monolith/users-svc/app.go:23
↓ 4 callersFunctionContextWithUser
(ctx context.Context, user User)
03-cohesion/01-low-cohesion/user.go:21
↓ 4 callersFunctionCreateUser
(r role.Role)
02-enums/02-typed-iota/main.go:10
↓ 4 callersFunctionCreateUser
(r role.Role)
02-enums/03-slugs/main.go:10
↓ 4 callersFunctionCreateUser
(r int)
02-enums/01-iota/main.go:9
↓ 4 callersFunctionNewQuery
NewQuery initializes a new Query using the passed in QueryMods
01-coupling/04-loosely-coupled-app-layer/models/boil_queries.go:27
↓ 4 callersFunctionNewQuery
NewQuery initializes a new Query using the passed in QueryMods
01-coupling/03-loosely-coupled-generated/models/boil_queries.go:27
↓ 4 callersFunctioncommandName
(cmd any)
03-cohesion/03-generics/decorators.go:67
↓ 4 callersMethoddoAfterSelectHooks
doAfterSelectHooks executes all "after Select" hooks.
01-coupling/04-loosely-coupled-app-layer/models/emails.go:275
↓ 4 callersMethoddoAfterSelectHooks
doAfterSelectHooks executes all "after Select" hooks.
01-coupling/04-loosely-coupled-app-layer/models/users.go:288
↓ 4 callersMethoddoAfterSelectHooks
doAfterSelectHooks executes all "after Select" hooks.
01-coupling/03-loosely-coupled-generated/models/emails.go:275
↓ 4 callersMethoddoAfterSelectHooks
doAfterSelectHooks executes all "after Select" hooks.
01-coupling/03-loosely-coupled-generated/models/users.go:288
↓ 4 callersFunctiongetDB
(t *testing.T)
05-distributed-transactions/tests/all_test.go:50
↓ 4 callersFunctiongetDB
(t *testing.T)
04-transactions/tests/all_test.go:52
↓ 4 callersFunctionmakeCacheKey
(cols boil.Columns, nzDefaults []string)
01-coupling/04-loosely-coupled-app-layer/models/boil_types.go:34
↓ 4 callersFunctionmakeCacheKey
(cols boil.Columns, nzDefaults []string)
01-coupling/03-loosely-coupled-generated/models/boil_types.go:34
↓ 3 callersFunctionCreateUser
(r role.Role)
02-enums/04-structs/main.go:10
↓ 3 callersMethodDeleteUser
Delete user (DELETE /users/{userID})
01-coupling/03-loosely-coupled-generated/internal/http_server.go:24
↓ 3 callersFunctionHandlerWithOptions
HandlerWithOptions creates http.Handler with additional options
01-coupling/04-loosely-coupled-app-layer/internal/http_server.go:175
↓ 3 callersFunctionHandlerWithOptions
HandlerWithOptions creates http.Handler with additional options
01-coupling/03-loosely-coupled-generated/internal/http_server.go:175
↓ 3 callersMethodInsert
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
01-coupling/04-loosely-coupled-app-layer/models/users.go:653
↓ 3 callersMethodInsert
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
01-coupling/03-loosely-coupled-generated/models/users.go:653
↓ 3 callersMethodPatchUser
Update user (PATCH /users/{userID})
01-coupling/03-loosely-coupled-generated/internal/http_server.go:30
↓ 2 callersMethodAddDiscount
(ctx context.Context, userID int, discount int)
04-transactions/01-no-tx/app.go:25
↓ 2 callersMethodAddress
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:144
↓ 2 callersMethodByID
(id int)
01-coupling/01-tightly-coupled/internal/db.go:36
↓ 2 callersMethodByID
(ctx context.Context, id int)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:45
↓ 2 callersMethodByID
(id int)
01-coupling/02-loosely-coupled/internal/db.go:63
↓ 2 callersMethodByID
(ctx context.Context, id int)
01-coupling/03-loosely-coupled-generated/internal/db.go:34
↓ 2 callersMethodDelete
(id int)
01-coupling/01-tightly-coupled/internal/db.go:77
↓ 2 callersMethodDelete
(ctx context.Context, id int)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:102
↓ 2 callersMethodDelete
(id int)
01-coupling/02-loosely-coupled/internal/db.go:104
↓ 2 callersMethodDelete
(ctx context.Context, id int)
01-coupling/03-loosely-coupled-generated/internal/db.go:87
↓ 2 callersMethodEmails
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:60
↓ 2 callersMethodGetPoints
(ctx context.Context, userID int)
04-transactions/01-no-tx/app.go:20
↓ 2 callersMethodGetUsers
Get all users (GET /users)
01-coupling/03-loosely-coupled-generated/internal/http_server.go:18
↓ 2 callersMethodID
()
04-transactions/05-tx-provider/models.go:27
↓ 2 callersMethodID
()
04-transactions/04-update-func-closure/models.go:27
↓ 2 callersMethodID
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:48
↓ 2 callersFunctionNewSubscribeHandler
(logger Logger, metricsClient MetricsClient)
03-cohesion/01-low-cohesion/subscribe.go:27
↓ 2 callersMethodPrimary
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:148
↓ 2 callersMethodPublish
(ctx context.Context, event any)
05-distributed-transactions/02-eventual-consistency/users-svc/app.go:23
↓ 2 callersMethodSetDisplayName
()
01-coupling/01-tightly-coupled/internal/user.go:27
↓ 2 callersMethodTakePoints
(ctx context.Context, userID int, points int)
04-transactions/01-no-tx/app.go:21
↓ 2 callersMethodValidate
()
01-coupling/01-tightly-coupled/internal/user.go:22
↓ 2 callersFunctionassertDiscount
(t *testing.T, userID int, expectedDiscount int)
05-distributed-transactions/tests/all_test.go:124
↓ 2 callersFunctionassertDiscount
(t *testing.T, userID int, expectedDiscount int)
04-transactions/tests/all_test.go:126
↓ 2 callersFunctionassertPoints
(t *testing.T, userID int, expectedPoints int)
05-distributed-transactions/tests/all_test.go:108
↓ 2 callersFunctionassertPoints
(t *testing.T, userID int, expectedPoints int)
04-transactions/tests/all_test.go:110
↓ 2 callersFunctionbuildUpsertQueryMySQL
buildUpsertQueryMySQL builds a SQL statement string using the upsertData provided.
01-coupling/04-loosely-coupled-app-layer/models/mysql_upsert.go:15
↓ 2 callersFunctionbuildUpsertQueryMySQL
buildUpsertQueryMySQL builds a SQL statement string using the upsertData provided.
01-coupling/03-loosely-coupled-generated/models/mysql_upsert.go:15
↓ 2 callersFunctiondbUserFromApp
(u User)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:107
↓ 2 callersFunctiondbUserToApp
(u *models.User)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:119
↓ 2 callersFunctiondisplayName
(firstName string, lastName string)
01-coupling/02-loosely-coupled/internal/http.go:244
↓ 2 callersFunctiondisplayName
(firstName string, lastName string)
01-coupling/03-loosely-coupled-generated/internal/http.go:222
↓ 2 callersMethoddoAfterDeleteHooks
doAfterDeleteHooks executes all "after Delete" hooks.
01-coupling/04-loosely-coupled-app-layer/models/emails.go:305
↓ 2 callersMethoddoAfterDeleteHooks
doAfterDeleteHooks executes all "after Delete" hooks.
01-coupling/04-loosely-coupled-app-layer/models/users.go:318
↓ 2 callersMethoddoAfterDeleteHooks
doAfterDeleteHooks executes all "after Delete" hooks.
01-coupling/03-loosely-coupled-generated/models/emails.go:305
↓ 2 callersMethoddoAfterDeleteHooks
doAfterDeleteHooks executes all "after Delete" hooks.
01-coupling/03-loosely-coupled-generated/models/users.go:318
↓ 2 callersMethoddoBeforeDeleteHooks
doBeforeDeleteHooks executes all "before Delete" hooks.
01-coupling/04-loosely-coupled-app-layer/models/emails.go:230
↓ 2 callersMethoddoBeforeDeleteHooks
doBeforeDeleteHooks executes all "before Delete" hooks.
01-coupling/04-loosely-coupled-app-layer/models/users.go:243
↓ 2 callersMethoddoBeforeDeleteHooks
doBeforeDeleteHooks executes all "before Delete" hooks.
01-coupling/03-loosely-coupled-generated/models/emails.go:230
↓ 2 callersMethoddoBeforeDeleteHooks
doBeforeDeleteHooks executes all "before Delete" hooks.
01-coupling/03-loosely-coupled-generated/models/users.go:243
↓ 2 callersFunctionnewUserResponse
(u User)
01-coupling/04-loosely-coupled-app-layer/internal/http.go:165
↓ 2 callersFunctionusePoints
(t *testing.T, tc testCase, userID int, points int)
05-distributed-transactions/tests/all_test.go:80
↓ 2 callersFunctionusePoints
(t *testing.T, tc testCase, userID int, points int)
04-transactions/tests/all_test.go:82
↓ 2 callersFunctionuserResponseFromDBModel
(u UserDBModel)
01-coupling/02-loosely-coupled/internal/http.go:210
↓ 2 callersFunctionuserResponseFromDBModel
(u *models.User)
01-coupling/03-loosely-coupled-generated/internal/http.go:200
↓ 1 callersMethodAdd
(user User)
01-coupling/01-tightly-coupled/internal/db.go:50
↓ 1 callersMethodAdd
(ctx context.Context, user User)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:57
↓ 1 callersMethodAdd
(user UserDBModel)
01-coupling/02-loosely-coupled/internal/db.go:77
↓ 1 callersMethodAdd
(ctx context.Context, user *models.User, email *models.Email)
01-coupling/03-loosely-coupled-generated/internal/db.go:46
↓ 1 callersMethodAll
()
01-coupling/01-tightly-coupled/internal/db.go:25
↓ 1 callersMethodAll
(ctx context.Context)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:31
↓ 1 callersMethodAll
()
01-coupling/02-loosely-coupled/internal/db.go:52
↓ 1 callersMethodAll
(ctx context.Context)
01-coupling/03-loosely-coupled-generated/internal/db.go:30
↓ 1 callersMethodChangeName
(newFirstName *string, newLastName *string)
01-coupling/04-loosely-coupled-app-layer/internal/user.go:77
↓ 1 callersFunctionContextWithUser
(ctx context.Context, user User)
03-cohesion/03-generics/user.go:21
↓ 1 callersFunctionContextWithUser
(ctx context.Context, user User)
03-cohesion/02-decorators/user.go:21
↓ 1 callersMethodDeleteAll
DeleteAll deletes all matching rows.
01-coupling/04-loosely-coupled-app-layer/models/users.go:1094
↓ 1 callersMethodDeleteAll
DeleteAll deletes all matching rows.
01-coupling/03-loosely-coupled-generated/models/users.go:1094
↓ 1 callersMethodDiscounts
()
04-transactions/05-tx-provider/models.go:39
↓ 1 callersMethodDiscounts
()
04-transactions/04-update-func-closure/models.go:39
↓ 1 callersMethodDisplayName
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:103
next →1–100 of 549, ranked by callers