Documentation
¶
Index ¶
- Constants
- Variables
- func CopyFile(dst, src string) (written int64, err error)
- func NewTag(ctx *Context, rb Ruby) (tag string, err error)
- func PathListForTag(ctx *Context, tag string) (path []string, err error)
- func SelectRubyFromList(tags RubyMap, label, verb string) (tag string, err error)
- func SortTagsByTagLabel(rubyMap *RubyMap) (tags []string, err error)
- func UIYesConfirm(prompt string) (resp string, err error)
- type Context
- type MarshalFunc
- type Ruby
- type RubyMap
- type RubyRegistry
Constants ¶
View Source
const ( Canary = `_U_` RubyRegistryVersion = `1.0.0` )
View Source
const ( AppName = `uru` AppVersion = `0.7.8` )
Variables ¶
View Source
var (
RbMajMinRegex, SysRbRegex *regexp.Regexp
KnownRubies []string
CanaryToken = fmt.Sprintf("%s%s%s", string(os.PathListSeparator),
Canary, string(os.PathListSeparator))
)
View Source
var BashWrapper = `` /* 301-byte string literal not displayed */
Functions ¶
func PathListForTag ¶
PathListForTag returns a PATH list appropriate for a given ruby tag.
func SelectRubyFromList ¶ added in v0.4.0
SelectRubyFromList presents a list of registered rubies and asks the user to select one. It returns the identifying tag for the selected ruby, or an error if unable to get the users selection.
func SortTagsByTagLabel ¶ added in v0.6.1
SortTagsByTagLabel returns a string slice of tags sorted by tag label.
func UIYesConfirm ¶
UIYesConfirm asks the user a question and returns Y or N with Y being the default.
Types ¶
type Context ¶
type Context struct {
Registry RubyRegistry
// contains filtered or unexported fields
}
func NewContext ¶ added in v0.7.2
func NewContext() *Context
func (*Context) SetCmdAndArgs ¶
func (*Context) SetCmdArgs ¶
type MarshalFunc ¶ added in v0.7.3
type Ruby ¶
type Ruby struct {
ID string // ruby version including patch number
TagLabel string // user friendly ruby tag value
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 ¶
type RubyRegistry struct {
Version string
Rubies RubyMap
// contains filtered or unexported fields
}
func (*RubyRegistry) Marshal ¶ added in v0.7.5
func (rr *RubyRegistry) Marshal(ctx *Context) (err error)
Click to show internal directories.
Click to hide internal directories.