Documentation
¶
Index ¶
- Constants
- Variables
- func CopyFile(dst, src string) (written int64, err error)
- func MarshalRubies(ctx *Context) (err error)
- func PathListForTag(ctx *Context, tag string) (path []string, err error)
- func StringSplitPath() (path []string, err error)
- func UIYesConfirm(prompt string) (resp string, err error)
- type Context
- func (c *Context) Cmd() string
- func (c *Context) CmdArgs() []string
- func (c *Context) CmdRegex(cmd string) *regexp.Regexp
- func (c *Context) Home() string
- func (c *Context) Init()
- func (c *Context) SetCmd(cmd string)
- func (c *Context) SetCmdAndArgs(cmd string, args []string)
- func (c *Context) SetCmdArgs(args []string)
- func (c *Context) SetCmdRegex(cmd string, r string) error
- func (c *Context) SetHome(h string)
- type Ruby
- type RubyRegistry
Constants ¶
View Source
const ( AppName = "uru" AppVersion = "0.3.0" )
Variables ¶
View Source
var ( KnownRubies []string SysRbRegex *regexp.Regexp Canary = fmt.Sprintf("%s%s%s", string(os.PathListSeparator), string(os.PathListSeparator), string(os.PathListSeparator)) )
View Source
var BashWrapper = `` /* 663-byte string literal not displayed */
Functions ¶
func MarshalRubies ¶
MarshallRubies persists the registered rubies to a JSON formatted file.
func PathListForTag ¶
PathListForTag returns a PATH list appropriate for a given ruby tag.
func StringSplitPath ¶
StringSplitPath splits the PATH env var into a slice of strings.
func UIYesConfirm ¶
UIYesConfirm asks the user a question and returns Y or N with Y being the default.
Types ¶
type Context ¶
type Context struct {
Rubies RubyRegistry
// contains filtered or unexported fields
}
func (*Context) SetCmdAndArgs ¶
func (*Context) SetCmdArgs ¶
type Ruby ¶
type Ruby struct {
ID string // ruby version including patch number
Exe string // ruby executable name
Home string // full path to ruby executable directory
GemHome string // full path to a ruby's gem home directory
Description string // full ruby description
}
func CurrentRubyInfo ¶
CurrentRubyInfo returns the identifying tag and metadata information for the ruby currently in use.
type RubyRegistry ¶
Click to show internal directories.
Click to hide internal directories.