chore: use any instead of interface{}

This commit is contained in:
Steven
2023-06-15 22:57:42 +08:00
parent 6512d6d277
commit a9f33cef6a
7 changed files with 13 additions and 13 deletions

View File

@@ -138,7 +138,7 @@ func (s *Store) DeleteWorkspaceUser(ctx context.Context, delete *api.WorkspaceUs
func upsertWorkspaceUser(ctx context.Context, tx *sql.Tx, upsert *api.WorkspaceUserUpsert) (*workspaceUserRaw, error) {
set := []string{"workspace_id", "user_id", "role"}
args := []interface{}{upsert.WorkspaceID, upsert.UserID, upsert.Role}
args := []any{upsert.WorkspaceID, upsert.UserID, upsert.Role}
placeholder := []string{"?", "?", "?"}
if v := upsert.UpdatedTs; v != nil {
@@ -168,7 +168,7 @@ func upsertWorkspaceUser(ctx context.Context, tx *sql.Tx, upsert *api.WorkspaceU
}
func findWorkspaceUserList(ctx context.Context, tx *sql.Tx, find *api.WorkspaceUserFind) ([]*workspaceUserRaw, error) {
where, args := []string{"1 = 1"}, []interface{}{}
where, args := []string{"1 = 1"}, []any{}
if v := find.WorkspaceID; v != nil {
where, args = append(where, "workspace_id = ?"), append(args, *v)