Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleLookPath (0.22 sec)

  1. src/os/exec/example_test.go

    // license that can be found in the LICENSE file.
    
    package exec_test
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"io"
    	"log"
    	"os"
    	"os/exec"
    	"strings"
    	"time"
    )
    
    func ExampleLookPath() {
    	path, err := exec.LookPath("fortune")
    	if err != nil {
    		log.Fatal("installing fortune is in your future")
    	}
    	fmt.Printf("fortune is available at %s\n", path)
    }
    
    func ExampleCommand() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 06:18:48 UTC 2022
    - 3.5K bytes
    - Viewed (0)
Back to top