msgs

package
v0.0.0-...-0376054 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Desktop = `` /* 204-byte string literal not displayed */
View Source
const PKGBUILDflutter = `` /* 559-byte string literal not displayed */
View Source
const PKGBUILDgocli = `` /* 265-byte string literal not displayed */
View Source
const ShFile = `#!/usr/bin/env sh
exec /usr/share/%s/%s`

Variables

View Source
var AssistHelp = `` /* 336-byte string literal not displayed */
View Source
var BuildHelp = `` /* 414-byte string literal not displayed */
View Source
var Err = color.New(color.Bold, color.FgHiRed).Sprintf("error: ")
View Source
var ErrGitSignKeyMissmatch = `git signing key does not exist in GnuPG.

Git signing key: ` + color.HiCyanString("%s") + `

You can check your gpg identity with command: ` + color.BlueString("gpg -K") + `

Make sure, that ` + color.HiRedString("user.signingkey") + ` matches key in ` + color.CyanString("~/.gitconfig")
View Source
var ErrGitUserMissmatch = `git and gnupg identities are different.

Your GnuPG authority: ` + color.HiGreenString("%s") + `
Your Git authority: ` + color.HiCyanString("%s") + `

Make sure, that ` + color.HiRedString("user.name") + ` and ` + color.HiRedString("user.email") + ` in ` + color.CyanString("~/.gitconfig") + ` are matching GnuPG name and email.`
View Source
var ErrGnuPGprivkeyNotFound = `GnuPG private key not found.
It is required for package signing, run:

1) Install gnupg:
` + color.YellowString("pack -S gnupg") + `

2) Generate a key:
` + color.YellowString("gpg --gen-key") + `

3) Get KEY-ID, paste it to next command:
` + color.YellowString("gpg -k") + `

4) Send it to key GPG server:
` + color.YellowString("gpg --send-keys KEY-ID") + `

5) Edit ` + color.BlueString("PACKAGER") + ` variable in ` + color.CyanString("/etc/makepkg.conf") + `
Name and email should match with name and email in GnuPG authority for pack to work properly.
`
View Source
var ErrNoPackager = `packager not found.

Add ` + color.BlueString("PACKAGER") + ` variable matching your GnuPG authority in ` + color.CyanString("/etc/makepkg.conf") + `

` + color.BlueString("PACKAGER") + `=` + color.HiGreenString("%s")
View Source
var ErrPackagerMissmatch = `signer and packager identities are different.

Your GnuPG authority: ` + color.HiGreenString("%s") + `
Your makepkg authority: ` + color.HiCyanString("%s") + `

Authority you defined in GnuPG is not matching with ` + color.BlueString("PACKAGER") + ` variable in ` + color.CyanString("/etc/makepkg.conf")
View Source
var Help = `` /* 421-byte string literal not displayed */
View Source
var PushHelp = `` /* 303-byte string literal not displayed */
View Source
var QueryHelp = `` /* 256-byte string literal not displayed */
View Source
var RemoveHelp = `` /* 374-byte string literal not displayed */
View Source
var SyncHelp = `` /* 367-byte string literal not displayed */
View Source
var Version = `` /* 255-byte string literal not displayed */

Functions

func Amsg

func Amsg(w io.Writer, msg string)

Write an announcement message with dots prefix and bold text to provided io.Writer.

func AskForConfirmation

func AskForConfirmation(in io.Reader, out io.Writer, msg string) bool

Asks the user for confirmation. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user.

func Inp

func Inp(msg string, w io.Writer, r io.Reader, hidden bool) (string, error)

Request an input from user.

func Loader

func Loader(p *LoaderParameters) func(int64, int64) error

Function that will give terminal drawer for provided message, that can be further used in different IO operations.

func Smsg

func Smsg(w io.Writer, msg string, i, t int)

Write step message, with enumeration which should represent state of program execution.

Types

type LoaderParameters

type LoaderParameters struct {
	Current int
	Total   int
	Msg     string
	Output  io.Writer
}

Jump to

Keyboard shortcuts

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