Compare commits

...

6 Commits

Author SHA1 Message Date
Marc Cornellà e11d004b7b
Merge f617883fdf into 917d2dc837 2024-11-07 17:36:33 +01:00
Sebastiaan van Stijn 917d2dc837
Merge pull request #5601 from vvoland/update-go
update to go1.23.3
2024-11-07 14:42:18 +01:00
Sebastiaan van Stijn f9497b8a46
Merge pull request #5600 from aevesdocker/desktop-link-fix
docs: change link to desktop docs
2024-11-07 13:56:47 +01:00
Paweł Gronowski 382d4c34a9
update to go1.23.3
- https://github.com/golang/go/issues?q=milestone%3AGo1.23.3+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.23.2...go1.23.3

go1.23.3 (released 2024-11-06) includes fixes to the linker, the
runtime, and the net/http, os, and syscall packages. See the
[Go 1.23.3 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.23.3+label%3ACherryPickApproved)
for details.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-11-07 13:24:16 +01:00
aevesdocker 1440f9f8cf docs: change link to desktop docs
Signed-off-by: aevesdocker <allie.sadler@docker.com>
2024-11-07 09:38:19 +00:00
Marc Cornellà f617883fdf
Fix docker plugin suggestions in Zsh completion
The __docker_plugins function calls `docker plugin ls` to get its information,
but it doesn't output a TAG column anymore. Without this change, triggering
the function, e.g. trying to complete `docker plugin inspect`, produces the
following error repeatedly:

  __docker_plugins:27: bad math expression: empty string

Also, the tag part of the docker plugin is shown in the NAME column, but the
colon (:) character is swallowed by the `_describe` function and interpreted
so that the right-side of the string is displayed as a comment to the suggestion.
For example: vieux/sshfs:latest is suggested like

  vieux/sshfs    -- latest

instead of the tag being part of the suggestion. This means that if there are
more than one tags installed of the same docker plugin, they are both combined
into a single completion entry, instead of two, one for each tag. By quoting
the colon character, the tag is now correctly offered in the suggestion.

With this commit the plugin description is added to each completion suggestion
and plugin names are shown without the redundant ":latest" tag.

Fixes #9294

Signed-off-by: Marc Cornellà <hello@mcornella.com>
2022-04-06 19:39:05 +02:00
11 changed files with 18 additions and 28 deletions

View File

@ -62,7 +62,7 @@ jobs:
name: Update Go name: Update Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: 1.23.2 go-version: 1.23.3
- -
name: Initialize CodeQL name: Initialize CodeQL
uses: github/codeql-action/init@v3 uses: github/codeql-action/init@v3

View File

@ -68,7 +68,7 @@ jobs:
name: Set up Go name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: 1.23.2 go-version: 1.23.3
- -
name: Test name: Test
run: | run: |

View File

@ -43,7 +43,7 @@ linters:
run: run:
# prevent golangci-lint from deducting the go version to lint for through go.mod, # prevent golangci-lint from deducting the go version to lint for through go.mod,
# which causes it to fallback to go1.17 semantics. # which causes it to fallback to go1.17 semantics.
go: "1.23.2" go: "1.23.3"
timeout: 5m timeout: 5m
linters-settings: linters-settings:

View File

@ -4,7 +4,7 @@ ARG BASE_VARIANT=alpine
ARG ALPINE_VERSION=3.20 ARG ALPINE_VERSION=3.20
ARG BASE_DEBIAN_DISTRO=bookworm ARG BASE_DEBIAN_DISTRO=bookworm
ARG GO_VERSION=1.23.2 ARG GO_VERSION=1.23.3
ARG XX_VERSION=1.5.0 ARG XX_VERSION=1.5.0
ARG GOVERSIONINFO_VERSION=v1.3.0 ARG GOVERSIONINFO_VERSION=v1.3.0
ARG GOTESTSUM_VERSION=v1.10.0 ARG GOTESTSUM_VERSION=v1.10.0

View File

@ -1558,31 +1558,21 @@ __docker_plugin_complete_ls_filters() {
__docker_plugins() { __docker_plugins() {
[[ $PREFIX = -* ]] && return 1 [[ $PREFIX = -* ]] && return 1
integer ret=1 integer ret=1
local line s local filter line s
declare -a lines plugins args declare -a lines plugins args
filter=$1; shift filter=$1; shift
[[ $filter != "none" ]] && args=("-f $filter") [[ $filter != "none" ]] && args=("-f $filter")
lines=(${(f)${:-"$(_call_program commands docker $docker_options plugin ls $args)"$'\n'}}) # Output plugins in format "name:tag\|description"
lines=(${(f)${:-"$(_call_program commands docker $docker_options plugin ls --format='{{.Name}}\|{{.Description}}' $args)"}})
# Parse header line to find columns # Suggestion entries: name:tag -- description
local i=1 j=1 k header=${lines[1]}
declare -A begin end
while (( j < ${#header} - 1 )); do
i=$(( j + ${${header[$j,-1]}[(i)[^ ]]} - 1 ))
j=$(( i + ${${header[$i,-1]}[(i) ]} - 1 ))
k=$(( j + ${${header[$j,-1]}[(i)[^ ]]} - 2 ))
begin[${header[$i,$((j-1))]}]=$i
end[${header[$i,$((j-1))]}]=$k
done
end[${header[$i,$((j-1))]}]=-1
lines=(${lines[2,-1]})
# Name
for line in $lines; do for line in $lines; do
s="${line[${begin[NAME]},${end[NAME]}]%% ##}" # - Remove redundant :latest tag
s="$s:${(l:7:: :::)${${line[${begin[TAG]},${end[TAG]}]}%% ##}}" # - Quote : in name:tag (_describe splits on : to separate entry and description)
# - Replace \| separator with :
s="${${${line//:latest/}//:/\:}//\|/:}"
plugins=($plugins $s) plugins=($plugins $s)
done done

View File

@ -1,5 +1,5 @@
variable "GO_VERSION" { variable "GO_VERSION" {
default = "1.23.2" default = "1.23.3"
} }
variable "VERSION" { variable "VERSION" {
default = "" default = ""

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG GO_VERSION=1.23.2 ARG GO_VERSION=1.23.3
ARG ALPINE_VERSION=3.20 ARG ALPINE_VERSION=3.20
ARG BUILDX_VERSION=0.17.1 ARG BUILDX_VERSION=0.17.1

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG GO_VERSION=1.23.2 ARG GO_VERSION=1.23.3
ARG ALPINE_VERSION=3.20 ARG ALPINE_VERSION=3.20
ARG GOLANGCI_LINT_VERSION=v1.61.0 ARG GOLANGCI_LINT_VERSION=v1.61.0

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG GO_VERSION=1.23.2 ARG GO_VERSION=1.23.3
ARG ALPINE_VERSION=3.20 ARG ALPINE_VERSION=3.20
ARG MODOUTDATED_VERSION=v0.8.0 ARG MODOUTDATED_VERSION=v0.8.0

View File

@ -1283,7 +1283,7 @@ connect to services running on the host machine.
It's conventional to use `host.docker.internal` as the hostname referring to It's conventional to use `host.docker.internal` as the hostname referring to
`host-gateway`. Docker Desktop automatically resolves this hostname, see `host-gateway`. Docker Desktop automatically resolves this hostname, see
[Explore networking features](https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host). [Explore networking features](https://docs.docker.com/desktop/features/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host).
The following example shows how the special `host-gateway` value works. The The following example shows how the special `host-gateway` value works. The
example runs an HTTP server that serves a file from host to container over the example runs an HTTP server that serves a file from host to container over the

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG GO_VERSION=1.23.2 ARG GO_VERSION=1.23.3
FROM golang:${GO_VERSION}-alpine AS generated FROM golang:${GO_VERSION}-alpine AS generated
ENV GOTOOLCHAIN=local ENV GOTOOLCHAIN=local