File tree Expand file tree Collapse file tree 1 file changed +34
-1
lines changed
Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,40 @@ Ordering issues may arise during batch conversion.
3434
3535Remove ` lib ` prefix.
3636
37- However, this may cause naming conflicts and needs to be verified.
37+ However, this cause naming conflicts.
38+
39+ with follow program verification:
40+
41+ ``` go
42+ func main () {
43+ names := make (map [string ][]string )
44+ dirs , err := os.ReadDir (" ./recipes" )
45+ if err != nil {
46+ panic (err)
47+ }
48+ for _ , pkg := range dirs {
49+ if pkg.IsDir () {
50+ pkgnoLib := strings.TrimPrefix (pkg.Name (), " lib" )
51+ names[pkgnoLib] = append (names[pkgnoLib], pkg.Name ())
52+ }
53+ }
54+ for name , pkgs := range names {
55+ if len (pkgs) > 1 {
56+ fmt.Println (name, pkgs)
57+ }
58+ }
59+ }
60+ ```
61+ we got some conflict name
62+
63+ ``` bash
64+ ❯ go run main.go
65+ tar [libtar tar]
66+ serial [libserial serial]
67+ vdpau [libvdpau vdpau]
68+ b2 [b2 libb2]
69+ gettext [gettext libgettext]
70+ ```
3871
3972### 5. Demo Validation
4073
You can’t perform that action at this time.
0 commit comments