1 Star 1 Fork 1

up-zero/gotool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
url.go 250 Bytes
一键复制 编辑 原始数据 按行查看 历史
GetcharZp 提交于 2024-06-27 18:37 +08:00 . feat url base name
package gotool
import (
"net/url"
"path"
)
// UrlBase 获取URL路径的基础名称
//
// rawURL 资源的网络地址
func UrlBase(rawURL string) string {
u, err := url.Parse(rawURL)
if err != nil {
return ""
}
return path.Base(u.Path)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/up-zero/gotool.git
git@gitee.com:up-zero/gotool.git
up-zero
gotool
gotool
main

搜索帮助