/
githubmirror
/
gogs
Обзор
Документация
Войти
/
githubmirror
/
gogs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v0.12.8
internal/pathutil/pathutil.go
15 строк
371 B
ᴜɴᴋɴᴡᴏɴ
repo/editor: clean up tree path
19 фев 2020, 18:45
Не верифицирован
19 фев 2020, 18:45
ce1ec81
Код
Авторство
О чём код?
// Copyright 2020 The Gogs 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 pathutil import ( "path" "strings" ) // Clean cleans up given path and returns a relative path that goes straight down. func Clean(p string) string { return strings.Trim(path.Clean("/"+p), "/") }