ReserveGoPackageAlias reserves the unique alias of go package. If succeeded, the alias will be never used for other packages in generated go files. If failed, the alias is already taken by another package, so you need to use another alias for the package in your go files.
(alias, pkgpath string)
| 483 | // If failed, the alias is already taken by another package, so you need to use another |
| 484 | // alias for the package in your go files. |
| 485 | func (r *Registry) ReserveGoPackageAlias(alias, pkgpath string) error { |
| 486 | if taken, ok := r.pkgAliases[alias]; ok { |
| 487 | if taken == pkgpath { |
| 488 | return nil |
| 489 | } |
| 490 | return fmt.Errorf("package name %s is already taken. Use another alias", alias) |
| 491 | } |
| 492 | r.pkgAliases[alias] = pkgpath |
| 493 | return nil |
| 494 | } |
| 495 | |
| 496 | // GetAllFQMNs returns a list of all FQMNs |
| 497 | func (r *Registry) GetAllFQMNs() []string { |
no outgoing calls