Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleUserConfigDir (0.16 sec)

  1. src/os/example_test.go

    	// Read and store cached data.
    	// …
    	_ = getCache
    	_ = putCache
    
    	// Output:
    }
    
    func ExampleUserConfigDir() {
    	dir, dirErr := os.UserConfigDir()
    
    	var (
    		configPath string
    		origConfig []byte
    	)
    	if dirErr == nil {
    		configPath = filepath.Join(dir, "ExampleUserConfigDir", "example.conf")
    		var err error
    		origConfig, err = os.ReadFile(configPath)
    		if err != nil && !os.IsNotExist(err) {
    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