Browse Source
migrate from com.* to alternatives (#14103)
migrate from com.* to alternatives (#14103)
* remove github.com/unknwon/com from models * dont use "com.ToStr()" * replace "com.ToStr" with "fmt.Sprint" where its easy to do * more refactor * fix test * just "proxy" Copy func for now * as per @lunnymj-v1.14.3
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 231 additions and 221 deletions
-
6cmd/serv.go
-
3contrib/pr/checkout.go
-
9integrations/git_helper_for_declarative_test.go
-
7integrations/integration_test.go
-
3integrations/migration-test/migration_test.go
-
5models/action.go
-
4models/admin.go
-
3models/branches.go
-
6models/issue.go
-
3models/issue_comment.go
-
3models/issue_xref.go
-
11models/login_source.go
-
4models/oauth2_application.go
-
15models/repo.go
-
4models/repo_unit.go
-
12models/ssh_key.go
-
7models/unit_tests.go
-
7models/user.go
-
9modules/base/tool.go
-
6modules/convert/convert.go
-
21modules/git/repo.go
-
5modules/ssh/ssh.go
-
23modules/util/compare.go
-
20modules/util/copy.go
-
3routers/admin/auths.go
-
4routers/admin/emails.go
-
6routers/admin/notice.go
-
17routers/admin/users.go
-
4routers/api/v1/user/user.go
-
43routers/api/v1/utils/hook.go
-
36routers/install.go
-
4routers/org/members.go
-
6routers/org/teams.go
-
10routers/repo/issue.go
-
4routers/repo/lfs.go
-
48routers/repo/pull.go
-
5routers/repo/webhook.go
-
6services/archiver/archiver_test.go
-
7services/mirror/mirror.go
-
7services/pull/check.go
-
4services/pull/check_test.go
-
4services/pull/pull.go
-
14services/repository/transfer.go
-
10services/repository/transfer_test.go
-
4services/webhook/deliver.go
-
10services/wiki/wiki.go
@ -0,0 +1,20 @@ |
|||
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|||
// Use of this source code is governed by a MIT-style
|
|||
// license that can be found in the LICENSE file.
|
|||
|
|||
package util |
|||
|
|||
import ( |
|||
"github.com/unknwon/com" |
|||
) |
|||
|
|||
// CopyFile copies file from source to target path.
|
|||
func CopyFile(src, dest string) error { |
|||
return com.Copy(src, dest) |
|||
} |
|||
|
|||
// CopyDir copy files recursively from source to target directory.
|
|||
// It returns error when error occurs in underlying functions.
|
|||
func CopyDir(srcPath, destPath string) error { |
|||
return com.CopyDir(srcPath, destPath) |
|||
} |