Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleExpand (0.1 sec)

  1. src/os/example_test.go

    	filename := "a-nonexistent-file"
    	if _, err := os.Stat(filename); errors.Is(err, fs.ErrNotExist) {
    		fmt.Println("file does not exist")
    	}
    	// Output:
    	// file does not exist
    }
    
    func ExampleExpand() {
    	mapper := func(placeholderName string) string {
    		switch placeholderName {
    		case "DAY_PART":
    			return "morning"
    		case "NAME":
    			return "Gopher"
    		}
    
    		return ""
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 17:35:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top