blob: ce819f5f41efa567ab413706787c81dce4799ed5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
// Use of this source code is governed by the GPL 3.0
package main
import (
"os"
"strings"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
func doAdd() error {
wd, _ := os.Getwd()
found := gitpb.NewRepos()
for repo := range me.forge.Repos.IterAll() {
if strings.HasPrefix(repo.FullPath, wd) {
found.Append(repo)
}
}
if found.Len() > 0 {
me.forge.PrintDefaultTB(found)
return nil
}
log.Info("todo: scan", wd, "here")
return nil
}
|