Improved documentation.

This commit is contained in:
Nuno Cruces 2020-01-29 16:45:40 +00:00
parent ba1f15ed0e
commit 5204cc85be
7 changed files with 37 additions and 12 deletions

View file

@ -374,14 +374,17 @@ func egestPaths(paths []string, err error) ([]string, error) {
return paths, err
}
// FileFilters is internal.
type FileFilters struct {
zenity.FileFilters
}
// String is internal.
func (f *FileFilters) String() string {
return "zenity.FileFilters"
}
// Set is internal.
func (f *FileFilters) Set(s string) error {
var filter zenity.FileFilter

View file

@ -8,6 +8,7 @@ import (
"golang.org/x/image/colornames"
)
// ParseColor is internal.
func ParseColor(s string) color.Color {
if len(s) == 4 || len(s) == 5 {
c := color.NRGBA{A: 0xf}
@ -46,6 +47,7 @@ func ParseColor(s string) color.Color {
return nil
}
// UnparseColor is internal.
func UnparseColor(c color.Color) string {
n := color.NRGBAModel.Convert(c).(color.NRGBA)
if n.A == 255 {

View file

@ -1,7 +1,13 @@
package zenutil
const LineBreak = "\n"
// These are internal.
const (
LineBreak = "\n"
)
var Command bool
var Timeout int
var Separator = "\x00"
// These are internal.
var (
Command bool
Timeout int
Separator = "\x00"
)

View file

@ -3,8 +3,14 @@
// Package zenutil is internal. DO NOT USE.
package zenutil
const LineBreak = "\n"
// These are internal.
const (
LineBreak = "\n"
)
var Command bool
var Timeout int
var Separator = "\x1e"
// These are internal.
var (
Command bool
Timeout int
Separator = "\x1e"
)

View file

@ -1,7 +1,13 @@
package zenutil
const LineBreak = "\r\n"
// These are internal.
const (
LineBreak = "\r\n"
)
var Command bool
var Timeout int
var Separator string
// These are internal.
var (
Command bool
Timeout int
Separator string
)

View file

@ -8,6 +8,7 @@ import (
"syscall"
)
// Run is internal.
func Run(ctx context.Context, script string, data interface{}) ([]byte, error) {
var buf strings.Builder

View file

@ -22,6 +22,7 @@ func init() {
tool = "zenity"
}
// Run is internal.
func Run(ctx context.Context, args []string) ([]byte, error) {
if Command && path != "" {
if Timeout > 0 {