elevate

package
v0.0.0-...-8b1022e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

README

Godoc

elevate currently only works for OS X and Windows. The Windows support currently uses a Visual Basic script that ends up displaying a confusing prompt and is generally hoaky - it will be replaced by a C++ program that does the same thing but with a better prompt.

On OS X, it uses cocoasudo from here - https://github.com/getlantern/cocoasudo, forked from https://github.com/kalikaneko/cocoasudo to explicitly support OSX 10.6.

Documentation

Overview

package elevate provides support for executing commands with elevated privileges.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(name string, args ...string) *exec.Cmd

Command is like exec.Command, except that it runs the given command with elevated privileges.

Types

type CommandBuilder

type CommandBuilder struct {
	// contains filtered or unexported fields
}

func WithIcon

func WithIcon(icon string) *CommandBuilder

func WithPrompt

func WithPrompt(prompt string) *CommandBuilder

func (*CommandBuilder) Command

func (b *CommandBuilder) Command(name string, args ...string) *exec.Cmd

func (*CommandBuilder) WithIcon

func (b *CommandBuilder) WithIcon(icon string) *CommandBuilder

func (*CommandBuilder) WithPrompt

func (b *CommandBuilder) WithPrompt(prompt string) *CommandBuilder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL