forked from x/icebergs
add some
This commit is contained in:
parent
d62af7bc90
commit
d1c31ad7a7
@ -109,11 +109,15 @@ func _repos_open(m *ice.Message, p string) *git.Repository {
|
|||||||
return mdb.HashSelectTarget(m, p, nil).(*git.Repository)
|
return mdb.HashSelectTarget(m, p, nil).(*git.Repository)
|
||||||
}
|
}
|
||||||
func _repos_each(m *ice.Message, title string, cb func(*git.Repository, ice.Maps) error) {
|
func _repos_each(m *ice.Message, title string, cb func(*git.Repository, ice.Maps) error) {
|
||||||
web.GoToastTable(m.Cmd(""), REPOS, func(value ice.Maps) {
|
web.GoToast(m, func(toast func(string, int, int)) []string {
|
||||||
|
m.Cmd("").Table(func(value ice.Maps, index, total int) {
|
||||||
|
toast(value[REPOS], index, total)
|
||||||
if err := cb(_repos_open(m, value[REPOS]), value); err != nil && err != git.NoErrAlreadyUpToDate {
|
if err := cb(_repos_open(m, value[REPOS]), value); err != nil && err != git.NoErrAlreadyUpToDate {
|
||||||
web.ToastFailure(m, value[REPOS], err.Error())
|
web.ToastFailure(m, value[REPOS], err.Error())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
return nil
|
||||||
|
})
|
||||||
}
|
}
|
||||||
func _repos_each_origin(m *ice.Message, title string, cb func(*git.Repository, string, *http.BasicAuth, ice.Maps) error) {
|
func _repos_each_origin(m *ice.Message, title string, cb func(*git.Repository, string, *http.BasicAuth, ice.Maps) error) {
|
||||||
m.Option("repos.auth", _repos_credentials(m))
|
m.Option("repos.auth", _repos_credentials(m))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user