finch icon indicating copy to clipboard operation
finch copied to clipboard

support the --format switch

Open kidbrax opened this issue 3 years ago • 5 comments

What is the problem you're trying to solve?.

I am trying to replace docker with finch but some tools require the --version switch so I am blocked. For example, this works in docker:

docker version --format {{.Server.APIVersion}}

but fails with finch:

finch version --format {{.Server.APIVersion}} FATA[0000] unknown flag: --format

Describe the feature you'd like

I'd like to be able to use the --format switch

Additional context Add any other context or screenshots about the feature request here.

kidbrax avatar Jan 31 '23 15:01 kidbrax

Hi @kidbrax, unfortunately Finch currently does not provide a REST API, and consequently it does not have the APIVersion field. We may be able to support the --format option in finch version, but if your tools are dependent on the APIVersion field, your use case may not be resolved.

mharwani avatar Jan 31 '23 18:01 mharwani

I believe the --format just takes Pretty | json?

Show the Docker version information

Usage:
  docker version [flags]

Flags:
  -f, --format string       Format the output. Values: [pretty | json]. (Default: pretty)
  -h, --help                Help for version
      --kubeconfig string   Kubernetes config file

Either way, I'm seeing this too as I try to get vscode to use finch instead of docker.

thirtytwobits avatar Feb 17 '23 21:02 thirtytwobits

adding an option to run finch version --format {{.Client.Version}} would possibly make finch compatible with spring-boot-docker-compose module

dominik-kovacs avatar Aug 27 '23 21:08 dominik-kovacs

Do we have an update on this issue?

dominik-kovacs avatar Aug 27 '23 21:08 dominik-kovacs

I could write the code to fix it, so I will handle it on my end!

haytok avatar Apr 26 '24 15:04 haytok