github.com/openshift/installer@v1.4.17/docs/dev/dependencies.md (about)

     1  # Managing Dependencies
     2  
     3  ## Build Dependencies
     4  
     5  The following dependencies must be installed on your system before you can build the installer.
     6  
     7  ### Fedora, CentOS, RHEL
     8  
     9  ```sh
    10  sudo dnf install golang-bin gcc-c++ zip
    11  ```
    12  
    13  If you need support for [libvirt destroy](libvirt/README.md#cleanup), you should also install `libvirt-devel`.
    14  
    15  ### Go
    16  
    17  We follow a hard flattening approach; i.e. direct and inherited dependencies are installed in the base `vendor/`.
    18  
    19  Dependencies are managed with [Go Modules](https://github.com/golang/go/wiki/Modules) but committed directly to the repository.
    20  
    21  We require at least Go 1.22.
    22  
    23  - Add or update a dependency with `go get <dependency>@<version>`.
    24  - If you want to use a fork of a project or ensure that a dependency is not updated even when another dependency requires a newer version of it, manually add a [replace directive in the go.mod file](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive). 
    25  - Run `go mod tidy` to tidy `go.mod` and update `go.sum`, then commit the changes.
    26  - Run `go mod vendor` to re-vendor and then commit updated vendored code separately.
    27  
    28  This [guide](https://github.com/golang/go/wiki/Modules#how-to-use-modules) is a great source to learn more about using `go mod`.
    29  
    30  For the sake of your fellow reviewers, commit vendored code separately from any other changes.