Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ThreeDotsLabs/go-web-app-antipatterns
/ functions
Functions
549 in github.com/ThreeDotsLabs/go-web-app-antipatterns
⨍
Functions
549
◇
Types & classes
216
↓ 96 callers
Method
Println
(args ...interface{})
03-cohesion/02-decorators/subscribe.go:12
↓ 53 callers
Method
ExecContext
(ctx context.Context, query string, args ...interface{})
04-transactions/05-tx-provider/repository.go:33
↓ 34 callers
Method
QueryRowContext
(ctx context.Context, query string, args ...interface{})
04-transactions/05-tx-provider/repository.go:32
↓ 17 callers
Method
Handle
(ctx context.Context, cmd C)
03-cohesion/03-generics/subscribe.go:8
↓ 11 callers
Method
String
()
02-enums/04-structs/role/role.go:9
↓ 9 callers
Method
Inc
(key string, value int)
03-cohesion/02-decorators/subscribe.go:8
↓ 8 callers
Method
Email
()
04-transactions/05-tx-provider/models.go:31
↓ 8 callers
Method
PostUser
Add a new user (POST /users)
01-coupling/03-loosely-coupled-generated/internal/http_server.go:21
↓ 7 callers
Method
Handle
(ctx context.Context, cmd Subscribe)
03-cohesion/02-decorators/subscribe.go:21
↓ 6 callers
Method
FirstName
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:52
↓ 6 callers
Method
LastName
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:56
↓ 5 callers
Method
GetAllUsers
()
01-coupling/tests/client.go:55
↓ 5 callers
Method
GetUser
Get a single user (GET /users/{userID})
01-coupling/03-loosely-coupled-generated/internal/http_server.go:27
↓ 5 callers
Method
UpdateByID
(ctx context.Context, userID int, updateFn func(user *User) (bool, error))
04-transactions/04-update-func-closure/app.go:17
↓ 5 callers
Function
findUserByEmail
(users []User, emailToFind string)
01-coupling/tests/end_to_end_test.go:279
↓ 5 callers
Method
relativeURL
(path string)
01-coupling/tests/client.go:142
↓ 4 callers
Method
AddDiscount
(ctx context.Context, userID int, discount int)
05-distributed-transactions/01-distributed-monolith/users-svc/app.go:23
↓ 4 callers
Function
ContextWithUser
(ctx context.Context, user User)
03-cohesion/01-low-cohesion/user.go:21
↓ 4 callers
Function
CreateUser
(r role.Role)
02-enums/02-typed-iota/main.go:10
↓ 4 callers
Function
CreateUser
(r role.Role)
02-enums/03-slugs/main.go:10
↓ 4 callers
Function
CreateUser
(r int)
02-enums/01-iota/main.go:9
↓ 4 callers
Function
NewQuery
NewQuery initializes a new Query using the passed in QueryMods
01-coupling/04-loosely-coupled-app-layer/models/boil_queries.go:27
↓ 4 callers
Function
NewQuery
NewQuery initializes a new Query using the passed in QueryMods
01-coupling/03-loosely-coupled-generated/models/boil_queries.go:27
↓ 4 callers
Function
commandName
(cmd any)
03-cohesion/03-generics/decorators.go:67
↓ 4 callers
Method
doAfterSelectHooks
doAfterSelectHooks executes all "after Select" hooks.
01-coupling/04-loosely-coupled-app-layer/models/emails.go:275
↓ 4 callers
Method
doAfterSelectHooks
doAfterSelectHooks executes all "after Select" hooks.
01-coupling/04-loosely-coupled-app-layer/models/users.go:288
↓ 4 callers
Method
doAfterSelectHooks
doAfterSelectHooks executes all "after Select" hooks.
01-coupling/03-loosely-coupled-generated/models/emails.go:275
↓ 4 callers
Method
doAfterSelectHooks
doAfterSelectHooks executes all "after Select" hooks.
01-coupling/03-loosely-coupled-generated/models/users.go:288
↓ 4 callers
Function
getDB
(t *testing.T)
05-distributed-transactions/tests/all_test.go:50
↓ 4 callers
Function
getDB
(t *testing.T)
04-transactions/tests/all_test.go:52
↓ 4 callers
Function
makeCacheKey
(cols boil.Columns, nzDefaults []string)
01-coupling/04-loosely-coupled-app-layer/models/boil_types.go:34
↓ 4 callers
Function
makeCacheKey
(cols boil.Columns, nzDefaults []string)
01-coupling/03-loosely-coupled-generated/models/boil_types.go:34
↓ 3 callers
Function
CreateUser
(r role.Role)
02-enums/04-structs/main.go:10
↓ 3 callers
Method
DeleteUser
Delete user (DELETE /users/{userID})
01-coupling/03-loosely-coupled-generated/internal/http_server.go:24
↓ 3 callers
Function
HandlerWithOptions
HandlerWithOptions creates http.Handler with additional options
01-coupling/04-loosely-coupled-app-layer/internal/http_server.go:175
↓ 3 callers
Function
HandlerWithOptions
HandlerWithOptions creates http.Handler with additional options
01-coupling/03-loosely-coupled-generated/internal/http_server.go:175
↓ 3 callers
Method
Insert
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 callers
Method
Insert
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 callers
Method
PatchUser
Update user (PATCH /users/{userID})
01-coupling/03-loosely-coupled-generated/internal/http_server.go:30
↓ 2 callers
Method
AddDiscount
(ctx context.Context, userID int, discount int)
04-transactions/01-no-tx/app.go:25
↓ 2 callers
Method
Address
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:144
↓ 2 callers
Method
ByID
(id int)
01-coupling/01-tightly-coupled/internal/db.go:36
↓ 2 callers
Method
ByID
(ctx context.Context, id int)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:45
↓ 2 callers
Method
ByID
(id int)
01-coupling/02-loosely-coupled/internal/db.go:63
↓ 2 callers
Method
ByID
(ctx context.Context, id int)
01-coupling/03-loosely-coupled-generated/internal/db.go:34
↓ 2 callers
Method
Delete
(id int)
01-coupling/01-tightly-coupled/internal/db.go:77
↓ 2 callers
Method
Delete
(ctx context.Context, id int)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:102
↓ 2 callers
Method
Delete
(id int)
01-coupling/02-loosely-coupled/internal/db.go:104
↓ 2 callers
Method
Delete
(ctx context.Context, id int)
01-coupling/03-loosely-coupled-generated/internal/db.go:87
↓ 2 callers
Method
Emails
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:60
↓ 2 callers
Method
GetPoints
(ctx context.Context, userID int)
04-transactions/01-no-tx/app.go:20
↓ 2 callers
Method
GetUsers
Get all users (GET /users)
01-coupling/03-loosely-coupled-generated/internal/http_server.go:18
↓ 2 callers
Method
ID
()
04-transactions/05-tx-provider/models.go:27
↓ 2 callers
Method
ID
()
04-transactions/04-update-func-closure/models.go:27
↓ 2 callers
Method
ID
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:48
↓ 2 callers
Function
NewSubscribeHandler
(logger Logger, metricsClient MetricsClient)
03-cohesion/01-low-cohesion/subscribe.go:27
↓ 2 callers
Method
Primary
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:148
↓ 2 callers
Method
Publish
(ctx context.Context, event any)
05-distributed-transactions/02-eventual-consistency/users-svc/app.go:23
↓ 2 callers
Method
SetDisplayName
()
01-coupling/01-tightly-coupled/internal/user.go:27
↓ 2 callers
Method
TakePoints
(ctx context.Context, userID int, points int)
04-transactions/01-no-tx/app.go:21
↓ 2 callers
Method
Validate
()
01-coupling/01-tightly-coupled/internal/user.go:22
↓ 2 callers
Function
assertDiscount
(t *testing.T, userID int, expectedDiscount int)
05-distributed-transactions/tests/all_test.go:124
↓ 2 callers
Function
assertDiscount
(t *testing.T, userID int, expectedDiscount int)
04-transactions/tests/all_test.go:126
↓ 2 callers
Function
assertPoints
(t *testing.T, userID int, expectedPoints int)
05-distributed-transactions/tests/all_test.go:108
↓ 2 callers
Function
assertPoints
(t *testing.T, userID int, expectedPoints int)
04-transactions/tests/all_test.go:110
↓ 2 callers
Function
buildUpsertQueryMySQL
buildUpsertQueryMySQL builds a SQL statement string using the upsertData provided.
01-coupling/04-loosely-coupled-app-layer/models/mysql_upsert.go:15
↓ 2 callers
Function
buildUpsertQueryMySQL
buildUpsertQueryMySQL builds a SQL statement string using the upsertData provided.
01-coupling/03-loosely-coupled-generated/models/mysql_upsert.go:15
↓ 2 callers
Function
dbUserFromApp
(u User)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:107
↓ 2 callers
Function
dbUserToApp
(u *models.User)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:119
↓ 2 callers
Function
displayName
(firstName string, lastName string)
01-coupling/02-loosely-coupled/internal/http.go:244
↓ 2 callers
Function
displayName
(firstName string, lastName string)
01-coupling/03-loosely-coupled-generated/internal/http.go:222
↓ 2 callers
Method
doAfterDeleteHooks
doAfterDeleteHooks executes all "after Delete" hooks.
01-coupling/04-loosely-coupled-app-layer/models/emails.go:305
↓ 2 callers
Method
doAfterDeleteHooks
doAfterDeleteHooks executes all "after Delete" hooks.
01-coupling/04-loosely-coupled-app-layer/models/users.go:318
↓ 2 callers
Method
doAfterDeleteHooks
doAfterDeleteHooks executes all "after Delete" hooks.
01-coupling/03-loosely-coupled-generated/models/emails.go:305
↓ 2 callers
Method
doAfterDeleteHooks
doAfterDeleteHooks executes all "after Delete" hooks.
01-coupling/03-loosely-coupled-generated/models/users.go:318
↓ 2 callers
Method
doBeforeDeleteHooks
doBeforeDeleteHooks executes all "before Delete" hooks.
01-coupling/04-loosely-coupled-app-layer/models/emails.go:230
↓ 2 callers
Method
doBeforeDeleteHooks
doBeforeDeleteHooks executes all "before Delete" hooks.
01-coupling/04-loosely-coupled-app-layer/models/users.go:243
↓ 2 callers
Method
doBeforeDeleteHooks
doBeforeDeleteHooks executes all "before Delete" hooks.
01-coupling/03-loosely-coupled-generated/models/emails.go:230
↓ 2 callers
Method
doBeforeDeleteHooks
doBeforeDeleteHooks executes all "before Delete" hooks.
01-coupling/03-loosely-coupled-generated/models/users.go:243
↓ 2 callers
Function
newUserResponse
(u User)
01-coupling/04-loosely-coupled-app-layer/internal/http.go:165
↓ 2 callers
Function
usePoints
(t *testing.T, tc testCase, userID int, points int)
05-distributed-transactions/tests/all_test.go:80
↓ 2 callers
Function
usePoints
(t *testing.T, tc testCase, userID int, points int)
04-transactions/tests/all_test.go:82
↓ 2 callers
Function
userResponseFromDBModel
(u UserDBModel)
01-coupling/02-loosely-coupled/internal/http.go:210
↓ 2 callers
Function
userResponseFromDBModel
(u *models.User)
01-coupling/03-loosely-coupled-generated/internal/http.go:200
↓ 1 callers
Method
Add
(user User)
01-coupling/01-tightly-coupled/internal/db.go:50
↓ 1 callers
Method
Add
(ctx context.Context, user User)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:57
↓ 1 callers
Method
Add
(user UserDBModel)
01-coupling/02-loosely-coupled/internal/db.go:77
↓ 1 callers
Method
Add
(ctx context.Context, user *models.User, email *models.Email)
01-coupling/03-loosely-coupled-generated/internal/db.go:46
↓ 1 callers
Method
All
()
01-coupling/01-tightly-coupled/internal/db.go:25
↓ 1 callers
Method
All
(ctx context.Context)
01-coupling/04-loosely-coupled-app-layer/internal/db.go:31
↓ 1 callers
Method
All
()
01-coupling/02-loosely-coupled/internal/db.go:52
↓ 1 callers
Method
All
(ctx context.Context)
01-coupling/03-loosely-coupled-generated/internal/db.go:30
↓ 1 callers
Method
ChangeName
(newFirstName *string, newLastName *string)
01-coupling/04-loosely-coupled-app-layer/internal/user.go:77
↓ 1 callers
Function
ContextWithUser
(ctx context.Context, user User)
03-cohesion/03-generics/user.go:21
↓ 1 callers
Function
ContextWithUser
(ctx context.Context, user User)
03-cohesion/02-decorators/user.go:21
↓ 1 callers
Method
DeleteAll
DeleteAll deletes all matching rows.
01-coupling/04-loosely-coupled-app-layer/models/users.go:1094
↓ 1 callers
Method
DeleteAll
DeleteAll deletes all matching rows.
01-coupling/03-loosely-coupled-generated/models/users.go:1094
↓ 1 callers
Method
Discounts
()
04-transactions/05-tx-provider/models.go:39
↓ 1 callers
Method
Discounts
()
04-transactions/04-update-func-closure/models.go:39
↓ 1 callers
Method
DisplayName
()
01-coupling/04-loosely-coupled-app-layer/internal/user.go:103
next →
1–100 of 549, ranked by callers