Skip to content

Commit 4f3d04a

Browse files
authored
Merge pull request #1 from luoliwoshang/doc/conanname
conflict name
2 parents 2c42a9a + 40e216f commit 4f3d04a

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

doc/conan.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,40 @@ Ordering issues may arise during batch conversion.
3434

3535
Remove `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

0 commit comments

Comments
 (0)