code: func (i *ImportRestriction) isForbidden(imp string) bool {
  	importsBelowRoot := strings.HasPrefix(imp, rootPackage)
  	importsBelowBase := strings.HasPrefix(imp, i.BaseDir)
  	importsAllowed := false
  	for _, allowed := range i.AllowedImports {
  		exactlyImportsAllowed := imp == allowed
  		importsBelowAllowed := strings.HasPrefix(imp, fmt.Sprintf("%s/", allowed))
  		importsAllowed = importsAllowed || (importsBelowAllowed || exactlyImportsAllowed)
  	}
  
  	return importsBelowRoot && !importsBelowBase && !importsAllowed
  }
docs: // isForbidden determines if an import is forbidden,
  // which is true when the import is:
  //   - of a package under the rootPackage
  //   - is not of the base import path or a sub-package of it
  //   - is not of an allowed path or a sub-package of one