Fix typos in code/comments

This commit is contained in:
Simon Legner 2018-01-31 22:04:21 +01:00
parent bd25a45829
commit 750ae0254c
4 changed files with 14 additions and 14 deletions

18
cmd.go
View file

@ -36,8 +36,8 @@ New operations:
yay {-G --getpkgbuild} [package(s)] yay {-G --getpkgbuild} [package(s)]
Permanent configuration options: Permanent configuration options:
--topdown Shows repository's packages first and then aur's --topdown Shows repository's packages first and then AUR's
--bottomup Shows aur's packages first and then repository's --bottomup Shows AUR's packages first and then repository's
--devel Check -git/-svn/-hg development version --devel Check -git/-svn/-hg development version
--nodevel Disable development version checking --nodevel Disable development version checking
--afterclean Clean package sources after successful build --afterclean Clean package sources after successful build
@ -176,7 +176,7 @@ func initAlpm() (err error) {
//TODO //TODO
//current system does not allow duplicate arguments //current system does not allow duplicate arguments
//but pacman allows multiple cachdirs to be passed //but pacman allows multiple cachdirs to be passed
//for now only hanle one cache dir //for now only handle one cache dir
value, _, exists = cmdArgs.getArg("cachdir") value, _, exists = cmdArgs.getArg("cachdir")
if exists { if exists {
alpmConf.CacheDir = []string{value} alpmConf.CacheDir = []string{value}
@ -234,7 +234,7 @@ cleanup:
//cleanup //cleanup
//from here on out dont exit if an error occurs //from here on out dont exit if an error occurs
//if we fail to save the configuration //if we fail to save the configuration
//atleast continue on and try clean up other parts //at least continue on and try clean up other parts
if updated { if updated {
err = saveVCSInfo() err = saveVCSInfo()
@ -312,7 +312,7 @@ func handleCmd() (err error) {
//this function should only set config options //this function should only set config options
//but currently still uses the switch left over from old code //but currently still uses the switch left over from old code
//eventuall this should be refactored out futher //eventually this should be refactored out futher
//my current plan is to have yay specific operations in its own operator //my current plan is to have yay specific operations in its own operator
//e.g. yay -Y --gendb //e.g. yay -Y --gendb
//e.g yay -Yg //e.g yay -Yg
@ -424,7 +424,7 @@ func handleGetpkgbuild() (err error) {
if err != nil { if err != nil {
//we print the error instead of returning it //we print the error instead of returning it
//seems as we can handle multiple errors without stoping //seems as we can handle multiple errors without stoping
//theres no easy way arround this right now //theres no easy way around this right now
fmt.Println(pkg+":", err) fmt.Println(pkg+":", err)
} }
} }
@ -521,7 +521,7 @@ func BuildRange(input string) ([]int, error) {
return BuildIntRange(rangeStart, rangeEnd), err return BuildIntRange(rangeStart, rangeEnd), err
} }
// Contains returns wheter e is present in s // Contains returns whether e is present in s
func contains(s []string, e string) bool { func contains(s []string, e string) bool {
for _, a := range s { for _, a := range s {
if a == e { if a == e {
@ -653,7 +653,7 @@ func numberMenu(pkgS []string, flags []string) (err error) {
return err return err
} }
// passToPacman outsorces execution to pacman binary without modifications. // passToPacman outsources execution to pacman binary without modifications.
func passToPacman(args *arguments) error { func passToPacman(args *arguments) error {
var cmd *exec.Cmd var cmd *exec.Cmd
argArr := make([]string, 0) argArr := make([]string, 0)
@ -674,7 +674,7 @@ func passToPacman(args *arguments) error {
return err return err
} }
// passToMakepkg outsorces execution to makepkg binary without modifications. // passToMakepkg outsources execution to makepkg binary without modifications.
func passToMakepkg(dir string, args ...string) (err error) { func passToMakepkg(dir string, args ...string) (err error) {
cmd := exec.Command(config.MakepkgBin, args...) cmd := exec.Command(config.MakepkgBin, args...)
cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr

View file

@ -235,7 +235,7 @@ func depTreeRecursive(dt *depTree, localDb *alpm.Db, syncDb alpm.DbList, isMake
for k, pkgName := range currentProcess { for k, pkgName := range currentProcess {
pkg, exists := dt.Aur[pkgName] pkg, exists := dt.Aur[pkgName]
//didnt get it in the request //did not get it in the request
if !exists { if !exists {
dt.Missing.set(dt.ToProcess[k]) dt.Missing.set(dt.ToProcess[k])
continue continue
@ -259,7 +259,7 @@ func depTreeRecursive(dt *depTree, localDb *alpm.Db, syncDb alpm.DbList, isMake
} }
_, exists = dt.Missing[dep] _, exists = dt.Missing[dep]
//we know it doesnt resolve so skip //we know it does not resolve so skip
if exists { if exists {
continue continue
} }
@ -277,7 +277,7 @@ func depTreeRecursive(dt *depTree, localDb *alpm.Db, syncDb alpm.DbList, isMake
continue continue
} }
//if all else failes add it to next search //if all else fails add it to next search
nextProcess = append(nextProcess, versionedDep) nextProcess = append(nextProcess, versionedDep)
} }
} }

View file

@ -146,7 +146,7 @@ func install(parser *arguments) error {
} }
if len(dc.RepoMake)+len(dc.AurMake) > 0 { if len(dc.RepoMake)+len(dc.AurMake) > 0 {
if continueTask("Remove make dependancies?", "yY") { if continueTask("Remove make dependencies?", "yY") {
return nil return nil
} }

View file

@ -278,7 +278,7 @@ func upRepo(local []alpm.Package) (upSlice, error) {
return slice, nil return slice, nil
} }
//Contains returns wheter e is present in s //Contains returns whether e is present in s
func containsInt(s []int, e int) bool { func containsInt(s []int, e int) bool {
for _, a := range s { for _, a := range s {
if a == e { if a == e {