Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ReadFilesWithFilter (0.25 sec)

  1. operator/pkg/util/util.go

    	for k, v := range m {
    		if v {
    			s = append(s, k)
    		}
    	}
    	return s
    }
    
    // ReadFilesWithFilter reads files from path, for a directory it recursively reads files and filters the results
    // for single file it directly reads the file. It returns a concatenated output of all matching files' content.
    func ReadFilesWithFilter(path string, filter FileFilter) (string, error) {
    	fileList, err := FindFiles(path, filter)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 02 13:01:43 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  2. operator/cmd/mesh/manifest-diff.go

    func compareManifestsFromDirs(verbose bool, dirName1, dirName2,
    	renameResources, selectResources, ignoreResources string,
    ) (bool, error) {
    	mf1, err := util.ReadFilesWithFilter(dirName1, yamlFileFilter)
    	if err != nil {
    		return false, err
    	}
    	mf2, err := util.ReadFilesWithFilter(dirName2, yamlFileFilter)
    	if err != nil {
    		return false, err
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 15 01:18:49 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. operator/cmd/mesh/manifest-generate_test.go

    			}
    			got, err := runManifestGenerate(filenames, tt.flags, csource, tt.fileSelect)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			if tt.outputDir != "" {
    				got, err = util.ReadFilesWithFilter(tt.outputDir, func(fileName string) bool {
    					return strings.HasSuffix(fileName, ".yaml")
    				})
    				if err != nil {
    					t.Fatal(err)
    				}
    			}
    
    			diffSelect := "*:*:*"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 18:05:06 UTC 2024
    - 43.5K bytes
    - Viewed (0)
Back to top