code: func copyLibrariesFiles(uses map[string]string, libs map[string]*raml.Library, ramlFile, dir string,
  	libRootURLs []string) error {
  	baseDir := filepath.Dir(ramlFile)
  	// copy library files
  	for _, path := range uses {
  		if err := copyFile(baseDir, path, dir, libRootURLs); err != nil {
  			return err
  		}
  	}
  
  	// do it recursively
  	for _, l := range libs {
  		if err := copyLibrariesFiles(l.Uses, l.Libraries, filepath.Join(baseDir, l.Filename),
  			filepath.Join(dir, filepath.Dir(l.Filename)), libRootURLs); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // copy all library files to apidocs directory