From 770ca29d9315620dcadd48a091a5bc2f4dd8b92f Mon Sep 17 00:00:00 2001 From: Oliver Eilhard Date: Tue, 21 Nov 2023 11:36:51 +0100 Subject: [PATCH] Clarify installation instructions This commit updates the installation instructions. We also update the repository to use a recent version of Go. Close #7 --- LICENSE | 2 +- README.md | 12 +++++++----- cmd/imgcat/imgcat.go | 3 +-- cmd/imgls/imgls.go | 3 +-- go.mod | 4 +++- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/LICENSE b/LICENSE index e5e168a..f02a33d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ The MIT License (MIT) -Copyright © 2012-2019 Oliver Eilhard +Copyright © 2012-2023 Oliver Eilhard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal diff --git a/README.md b/README.md index dc0e2e9..eddb77d 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,23 @@ Be sure to ![imgls](/img/imgls.png?raw=true "imgls") -# Installation +## Installation -To install `imgcat`, type: +To install `imgcat`, you should have a recent version of Go (1.21+ at the time of writing this), and type: ```go -GO111MODULE=on go get -u github.com/olivere/iterm2-imagetools/cmd/imgcat +go install github.com/olivere/iterm2-imagetools/cmd/imgcat@latest ``` To install `imgls`, type: ```go -GO111MODULE=on go get -u github.com/olivere/iterm2-imagetools/cmd/imgls +go install github.com/olivere/iterm2-imagetools/cmd/imgls@latest ``` -# License +The binaries then get installed into the `$GOPATH/bin` directory (or `$HOME/go/bin` if `GOPATH` is not set; see `go help install`), which you can add to your `$PATH`. + +## License MIT-LICENSE. See [LICENSE](http://olivere.mit-license.org/) or the LICENSE file provided in the repository for details. diff --git a/cmd/imgcat/imgcat.go b/cmd/imgcat/imgcat.go index 3923d22..cd426d2 100644 --- a/cmd/imgcat/imgcat.go +++ b/cmd/imgcat/imgcat.go @@ -10,7 +10,6 @@ import ( "flag" "fmt" "io" - "io/ioutil" "log" "net/http" "os" @@ -66,7 +65,7 @@ func main() { } func display(r io.Reader) error { - data, err := ioutil.ReadAll(r) + data, err := io.ReadAll(r) if err != nil { return err } diff --git a/cmd/imgls/imgls.go b/cmd/imgls/imgls.go index 7d6bbe3..ebfff65 100644 --- a/cmd/imgls/imgls.go +++ b/cmd/imgls/imgls.go @@ -10,7 +10,6 @@ import ( "flag" "fmt" "io" - "io/ioutil" "log" "os" "path/filepath" @@ -53,7 +52,7 @@ func main() { } func display(filename string, r io.Reader) error { - data, err := ioutil.ReadAll(r) + data, err := io.ReadAll(r) if err != nil { return err } diff --git a/go.mod b/go.mod index 5dec5a3..01bd35a 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/olivere/iterm2-imagetools -go 1.12 +go 1.21.0 + +toolchain go1.21.4