go path 源码

2022-07-15 浏览 (915)

golang path 代码

文件路径:/src/cmd/go/internal/load/path.go

/ Copyright 2017 The Go Authors. All rights reserved.
/ Use of this source code is governed by a BSD-style
/ license that can be found in the LICENSE file.

package load

import (
	"path/filepath"
)

/ expandPath returns the symlink-expanded form of path.
func expandPath(p string) string {
	x, err := filepath.EvalSymlinks(p)
	if err == nil {
		return x
	}
	return p
}

相关信息

go 源码目录

相关文章

go flag 源码

go flag_test 源码

go pkg 源码

go pkg_test 源码

go search 源码

go test 源码

^