go get is deprecated, instead use go install (#717)
* go get is deprecated, instead use go install * update the build instructions for different go version * build: fix typo and adjust it for windows cmd and powershell
This commit is contained in:
1 parent
7872455021
commit
1a264b2f77
1 file changed
+27
-7
@@ -41,19 +41,39 @@ See [releases](https://github.com/gokcehan/lf/releases) for pre-built binaries.
|
|||||||
|
|
||||||
If you like to build from the source on unix:
|
If you like to build from the source on unix:
|
||||||
|
|
||||||
env CGO_ENABLED=0 GO111MODULE=on go get -u -ldflags="-s -w" github.com/gokcehan/lf
|
```bash
|
||||||
|
# For go version < 1.17
|
||||||
|
env CGO_ENABLED=0 GO111MODULE=on go get -u -ldflags="-s -w" github.com/gokcehan/lf
|
||||||
|
|
||||||
|
# For go version >= 1.17
|
||||||
|
env CGO_ENABLED=0 go install -ldflags="-s -w" github.com/gokcehan/lf@latest
|
||||||
|
```
|
||||||
|
|
||||||
On windows `cmd`:
|
On windows `cmd`:
|
||||||
|
|
||||||
set CGO_ENABLED=0
|
```cmd
|
||||||
set GO111MODULE=on
|
REM For go version < 1.17
|
||||||
go get -u -ldflags="-s -w" github.com/gokcehan/lf
|
set CGO_ENABLED=0
|
||||||
|
set GO111MODULE=on
|
||||||
|
go get -u -ldflags="-s -w" github.com/gokcehan/lf
|
||||||
|
|
||||||
|
REM For go version >= 1.17
|
||||||
|
set CGO_ENABLED=0
|
||||||
|
go install -ldflags="-s -w" github.com/gokcehan/lf@latest
|
||||||
|
```
|
||||||
|
|
||||||
On windows `powershell`:
|
On windows `powershell`:
|
||||||
|
|
||||||
$env:CGO_ENABLED = '0'
|
```powershell
|
||||||
$env:GO111MODULE = 'on'
|
# For go version < 1.17
|
||||||
go get -u -ldflags="-s -w" github.com/gokcehan/lf
|
$env:CGO_ENABLED = '0'
|
||||||
|
$env:GO111MODULE = 'on'
|
||||||
|
go get -u -ldflags="-s -w" github.com/gokcehan/lf
|
||||||
|
|
||||||
|
# For go version >= 1.17
|
||||||
|
$env:CGO_ENABLED = '0'
|
||||||
|
go install -ldflags="-s -w" github.com/gokcehan/lf@latest
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user