elvish: github.com/elves/elvish/pkg/eval/mods/platform Index | Files

package platform

import "github.com/elves/elvish/pkg/eval/mods/platform"

Package platform exposes variables and functions that deal with the specific platform being run on, such as the OS name and CPU architecture.


Package Files

platform.go unix.go


var Ns = eval.Ns{
    "arch":       vars.NewReadOnly(runtime.GOARCH),
    "os":         vars.NewReadOnly(runtime.GOOS),
    "is-unix":    vars.NewReadOnly(isUnix),
    "is-windows": vars.NewReadOnly(isWindows),
}.AddGoFns("platform:", map[string]interface{}{
    "hostname": hostname,

Package platform imports 5 packages (graph) and is imported by 1 packages. Updated 2020-09-28. Refresh now. Tools for package owners.