github.com/khulnasoft-lab/gopkg@v0.0.0-20240121181808-81b44d894093/docs/gopkg-plugin-example (about)

     1  #!/bin/bash
     2  
     3  # You can execute me through Gopkg by doing the following:
     4  # - Copy me to a directory on $PATH. _vendor/bin/ will work just fine.
     5  # - Execute `gopkg plugin-example`
     6  # - ???
     7  # - Profit
     8  
     9  echo "I received arguments '$@'"
    10  
    11  # This should match the directory from which you executed gopkg.
    12  echo "My current working directory is $(pwd)"
    13  
    14  # This is the GOPATH for the current gopkg session.
    15  echo "My GOPATH is $GOPATH"
    16  
    17  # This is the base directory of your project.
    18  echo "The project directory is $GOPKG_PROJECT"
    19  
    20  # This is the location of the gopkg.yaml file.
    21  echo "The Gopkg YAML is in $GOPKG_YAML"
    22  
    23  # This is the PATH that the plugin inherited.
    24  echo "My PATH is $PATH"
    25