关于golang:Golang-平滑重启库-overseer

8次阅读

共计 686 个字符,预计需要花费 2 分钟才能阅读完成。

Overseer 浏览

零散内容

exexutable

// Copyright 2016 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 os
// Executable returns the path name for the executable that started
// the current process. There is no guarantee that the path is still
// pointing to the correct executable. If a symlink was used to start
// the process, depending on the operating system, the result might
// be the symlink or the path it pointed to. If a stable result is
// needed, path/filepath.EvalSymlinks might help.
//
// Executable returns an absolute path unless an error occurred.
//
// The main use case is finding resources located relative to an
// executable.
func Executable() (string, error) {return executable()
}

Executable() 返回的是可执行文件的门路。

正文完
 0