♻️ 一些工具函数移动到 gulu 项目中

This commit is contained in:
Liang Ding 2022-06-23 19:35:59 +08:00
parent afbe434239
commit 705f34ccd1
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
10 changed files with 20 additions and 65 deletions

View file

@ -84,8 +84,8 @@ func setWorkspaceDir(c *gin.Context) {
}
workspacePaths = append(workspacePaths, path)
workspacePaths = util.RemoveDuplicatedElem(workspacePaths)
workspacePaths = util.RemoveElem(workspacePaths, path)
workspacePaths = gulu.Str.RemoveDuplicatedElem(workspacePaths)
workspacePaths = gulu.Str.RemoveElem(workspacePaths, path)
workspacePaths = append(workspacePaths, path) // 切换的工作空间固定放在最后一个
if data, err = gulu.JSON.MarshalJSON(workspacePaths); nil != err {