diff options
author | 6543 <6543@obermui.de> | 2020-12-25 09:59:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-25 11:59:32 +0200 |
commit | a19447aed128ecadfcd938d6a80cd4951af1f4ce (patch) | |
tree | 6312bf946d601aab29731645a4777feeaea66036 /services/wiki | |
parent | 04ae0f2f3f4556c6d0b4adc5f2cffd0cc7d25151 (diff) | |
download | gitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.tar.gz gitea-a19447aed128ecadfcd938d6a80cd4951af1f4ce.zip |
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 @lunny
Diffstat (limited to 'services/wiki')
-rw-r--r-- | services/wiki/wiki.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/services/wiki/wiki.go b/services/wiki/wiki.go index 67ba1abd0f..75b9d1d1f5 100644 --- a/services/wiki/wiki.go +++ b/services/wiki/wiki.go @@ -17,8 +17,6 @@ import ( repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/sync" "code.gitea.io/gitea/modules/util" - - "github.com/unknwon/com" ) var ( @@ -88,8 +86,8 @@ func updateWikiPage(doer *models.User, repo *models.Repository, oldWikiName, new if err = nameAllowed(newWikiName); err != nil { return err } - wikiWorkingPool.CheckIn(com.ToStr(repo.ID)) - defer wikiWorkingPool.CheckOut(com.ToStr(repo.ID)) + wikiWorkingPool.CheckIn(fmt.Sprint(repo.ID)) + defer wikiWorkingPool.CheckOut(fmt.Sprint(repo.ID)) if err = InitWiki(repo); err != nil { return fmt.Errorf("InitWiki: %v", err) @@ -242,8 +240,8 @@ func EditWikiPage(doer *models.User, repo *models.Repository, oldWikiName, newWi // DeleteWikiPage deletes a wiki page identified by its path. func DeleteWikiPage(doer *models.User, repo *models.Repository, wikiName string) (err error) { - wikiWorkingPool.CheckIn(com.ToStr(repo.ID)) - defer wikiWorkingPool.CheckOut(com.ToStr(repo.ID)) + wikiWorkingPool.CheckIn(fmt.Sprint(repo.ID)) + defer wikiWorkingPool.CheckOut(fmt.Sprint(repo.ID)) if err = InitWiki(repo); err != nil { return fmt.Errorf("InitWiki: %v", err) |