compose/cmd/compose
Eng Zer Jun 6c345b3755
refactor(cmd/compose/run): remove redundant `len` check
From the Go specification [1]:

  "1. For a nil slice, the number of iterations is 0."

`len` returns 0 if the slice is nil [2]. Therefore, checking
`len(v) > 0` before a loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range
[2]: https://pkg.go.dev/builtin#len

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-23 16:06:52 +08:00
..
alpha.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
build.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
completion.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
compose.go Merge pull request #11051 from ndeloof/warn_remote_disabled 2023-10-18 12:54:40 +02:00
compose_test.go add support for `restart` for `depends_on` 2023-02-18 12:55:29 +01:00
config.go Don't delete dependent services 2023-09-29 06:43:16 +02:00
cp.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
create.go check that the pull policy provided is a valid one 2023-10-18 15:44:37 +02:00
create_test.go cli: fix `--build` flag for `create` (#10982) 2023-09-08 11:35:57 -04:00
down.go enable profile when down is ran with explicit service names 2023-10-18 12:19:45 +02:00
events.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
exec.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
images.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
kill.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
list.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
logs.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
options.go build: pass BuildOptions around explicitly & fix multi-platform issues 2023-09-01 08:32:56 +02:00
options_test.go build: pass BuildOptions around explicitly & fix multi-platform issues 2023-09-01 08:32:56 +02:00
pause.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
port.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
ps.go deps: remove deprecated github.com/pkg/errors 2023-09-29 06:28:58 +02:00
ps_test.go align docker compose ps with docker CLI to support --format 2023-08-25 16:36:45 +02:00
publish.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
pull.go introduce pull --missing flag to only pull images not present in cache 2023-09-15 08:41:27 +02:00
pullOptions_test.go introduce pull --missing flag to only pull images not present in cache 2023-09-15 08:41:27 +02:00
push.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
remove.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
restart.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
run.go refactor(cmd/compose/run): remove redundant `len` check 2023-10-23 16:06:52 +08:00
scale.go deps: remove deprecated github.com/pkg/errors 2023-09-29 06:28:58 +02:00
start.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
stop.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
top.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
up.go introduce pull --missing flag to only pull images not present in cache 2023-09-15 08:41:27 +02:00
up_test.go Add `--scale` to `compose create`, refactor scale option 2023-01-26 13:03:34 +01:00
version.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
viz.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
viz_test.go Added tests to `viz` subcommand 2023-04-24 12:18:37 +02:00
wait.go pull OCI remote resource 2023-09-07 07:27:32 +02:00
watch.go deps: remove deprecated github.com/pkg/errors 2023-09-29 06:28:58 +02:00