-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the Go Quickstart README #1896
Conversation
README.md
Outdated
```sh | ||
go get github.com/minio/minio-go/v7 | ||
go install github.com/minio/minio-go/v7@latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what worked for me, is @latest
appropriate here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No libraries do go get
not go install
- go install
is meant for binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harshavardhana is there more to know about how to use go get
for the Go SDK? When I tried the original command, I got an error that said to use go install
.
go-dev[feorlen]:~$ go get github.com/minio/minio-go/v7
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
go-dev[feorlen]:~/dev$ go install github.com/minio/minio-go/v7
go: 'go install' requires a version when current directory is not in a module
Try 'go install github.com/minio/minio-go/v7@latest' to install the latest version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need a project folder first i.e
mkdir myproject
go mod init
go get github.com/minio/minio-go/v7@latest
.. then you code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if you are a Go developer you would know why this SDK says go get
that is a pre-requisite we expect. We do not need to explain to them how to write Go or the tooling and ecosystem around it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you read the error message
go: go.mod file not found in current directory or any parent directory.
That is generally explaining what it is expecting when you do go get
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok so my issue is order of operations. 👍🏻
dd if=/dev/urandom of=/tmp/testdata bs=2048 count=10 | ||
``` | ||
|
||
**2. Run FileUploader with the following commands:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedback on these commands very welcome, this is what worked for me. I'm not sure the usual Go way of referring to these operations.
For now, this is not intended to be a comprehensive discussion. Just the basics for someone generally familiar with the language and tools.
README.md
Outdated
```sh | ||
go get github.com/minio/minio-go/v7 | ||
go install github.com/minio/minio-go/v7@latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No libraries do go get
not go install
- go install
is meant for binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't comment on the actual Go coding part, but some suggestions for wording other parts of it.
@harshavardhana Revised/clarified SDK install. I left a few of the potentially "unnecessary" commands so someone can copy/paste and run the sample code in their current directory. Let me know if there's anything else that could be improved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/aws/aws-sdk-go](https://togithub.com/aws/aws-sdk-go) | require | patch | `v1.48.0` -> `v1.48.4` | | [github.com/cerbos/cerbos/api/genpb](https://togithub.com/cerbos/cerbos) | require | digest | `7dd5d0c` -> `ce425d9` | | [github.com/cerbos/protoc-gen-jsonschema](https://togithub.com/cerbos/protoc-gen-jsonschema) | require | patch | `v0.1.1` -> `v0.1.2` | | [github.com/doug-martin/goqu/v9](https://togithub.com/doug-martin/goqu) | require | minor | `v9.18.0` -> `v9.19.0` | | [github.com/minio/minio-go/v7](https://togithub.com/minio/minio-go) | require | patch | `v7.0.63` -> `v7.0.64` | | [github.com/pterm/pterm](https://togithub.com/pterm/pterm) | require | patch | `v0.12.70` -> `v0.12.71` | | [github.com/rivo/tview](https://togithub.com/rivo/tview) | require | digest | `7c9e464` -> `33a1d27` | | [github.com/vektra/mockery/v2](https://togithub.com/vektra/mockery) | require | minor | `v2.37.1` -> `v2.38.0` | | [google.golang.org/genproto/googleapis/api](https://togithub.com/googleapis/go-genproto) | require | digest | `bbf56f3` -> `83a465c` | | [google.golang.org/protobuf](https://togithub.com/protocolbuffers/protobuf-go) | require | digest | `a8317fb` -> `9b87403` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>aws/aws-sdk-go (github.com/aws/aws-sdk-go)</summary> ### [`v1.48.4`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v1484-2023-11-27) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.48.3...v1.48.4) \=== ##### Service Client Updates - `service/accessanalyzer`: Updates service API, documentation, and paginators - `service/amp`: Updates service API, documentation, waiters, and paginators - `service/bcm-data-exports`: Adds new service - `service/cloudtrail`: Updates service API and documentation - CloudTrail Lake now supports federating event data stores. giving users the ability to run queries against their event data using Amazon Athena. - `service/codestar-connections`: Updates service API, documentation, and paginators - `service/compute-optimizer`: Updates service API and documentation - `service/config`: Updates service API and documentation - `service/controltower`: Updates service API, documentation, and paginators - `service/cost-optimization-hub`: Adds new service - `service/detective`: Updates service API and documentation - `service/ecs`: Updates service API and documentation - Adds a new 'type' property to the Setting structure. Adds a new AccountSetting - guardDutyActivate for ECS. - `service/eks`: Updates service API, documentation, and paginators - `service/eks-auth`: Updates service API, documentation, waiters, paginators, and examples - `service/elasticfilesystem`: Updates service API, documentation, and paginators - Adding support for EFS Archive lifecycle configuration. - `service/elasticloadbalancingv2`: Updates service API, documentation, and paginators - `service/freetier`: Updates service API, documentation, paginators, and examples - `service/fsx`: Updates service API and documentation - `service/guardduty`: Updates service API and documentation - Add support for Runtime Monitoring for ECS and ECS-EC2. - `service/iotfleetwise`: Updates service API and documentation - `service/lakeformation`: Updates service API and documentation - `service/logs`: Updates service API, documentation, and paginators - Added APIs to Create, Update, Get, List and Delete LogAnomalyDetectors and List and Update Anomalies in Detector. Added LogGroupClass attribute for LogGroups to classify loggroup as Standard loggroup with all capabilities or InfrequentAccess loggroup with limited capabilities. - `service/managedblockchain`: Updates service API and documentation - `service/models.lex.v2`: Updates service API, documentation, and paginators - `service/personalize`: Updates service API and documentation - `service/personalize-events`: Updates service API and documentation - `service/personalize-runtime`: Updates service API and documentation - `service/quicksight`: Updates service API and documentation - This release launches new APIs for trusted identity propagation setup and supports creating datasources using trusted identity propagation as authentication method for QuickSight accounts configured with IAM Identity Center. - `service/redshift`: Updates service API and documentation - This release adds support for multi-data warehouse writes through data sharing. - `service/repostspace`: Adds new service - `service/runtime.lex.v2`: Updates service API and documentation - `service/s3`: Updates service API, documentation, and examples - Adding new params - Key and Prefix, to S3 API operations for supporting S3 Access Grants. Note - These updates will not change any of the existing S3 API functionality. - `service/s3control`: Updates service API, documentation, and paginators - Introduce Amazon S3 Access Grants, a new S3 access control feature that maps identities in directories such as Active Directory, or AWS Identity and Access Management (IAM) Principals, to datasets in S3. - `service/secretsmanager`: Updates service API, documentation, and paginators - AWS Secrets Manager has released the BatchGetSecretValue API, which allows customers to fetch up to 20 Secrets with a single request using a list of secret names or filters. - `service/securityhub`: Updates service API, documentation, and examples - `service/states`: Updates service API and documentation - Adds new TestState operation which accepts the definition of a single state and executes it. You can test a state without creating a state machine or updating an existing state machine. - `service/transcribe`: Updates service API and documentation - `service/workspaces`: Updates service API and documentation - The release introduces Multi-Region Resilience one-way data replication that allows you to replicate data from your primary WorkSpace to a standby WorkSpace in another AWS Region. DescribeWorkspaces now returns the status of data replication. - `service/workspaces-thin-client`: Adds new service ### [`v1.48.3`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v1483-2023-11-22) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.48.2...v1.48.3) \=== ##### Service Client Updates - `service/kinesis`: Updates service API and documentation - This release adds support for resource based policies on streams and consumers. - `service/s3control`: Updates service API and documentation - Amazon S3 Batch Operations now manages buckets or prefixes in a single step. - `service/sagemaker`: Updates service API and documentation - This feature adds the end user license agreement status as a model access configuration parameter. ### [`v1.48.2`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v1482-2023-11-21) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.48.1...v1.48.2) \=== ##### Service Client Updates - `service/cloudfront`: Updates service API, documentation, paginators, and examples - This release adds support for CloudFront KeyValueStore, a globally managed key value datastore associated with CloudFront Functions. - `service/cloudfront-keyvaluestore`: Adds new service - `service/ec2`: Updates service documentation - Documentation updates for Amazon EC2. - `service/inspector-scan`: Adds new service - `service/iotsitewise`: Updates service API, documentation, and paginators - `service/iottwinmaker`: Updates service API, documentation, and paginators - `service/s3`: Updates service API, documentation, and examples - Add support for automatic date based partitioning in S3 Server Access Logs. ### [`v1.48.1`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v1481-2023-11-20) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.48.0...v1.48.1) \=== ##### Service Client Updates - `service/codestar-connections`: Updates service API, documentation, and paginators - `service/docdb`: Updates service API and documentation - Amazon DocumentDB updates for new cluster storage configuration: Amazon DocumentDB I/O-Optimized. - `service/ec2`: Updates service API and documentation - This release adds support for Security group referencing over Transit gateways, enabling you to simplify Security group management and control of instance-to-instance traffic across VPCs that are connected by Transit gateway. </details> <details> <summary>cerbos/protoc-gen-jsonschema (github.com/cerbos/protoc-gen-jsonschema)</summary> ### [`v0.1.2`](https://togithub.com/cerbos/protoc-gen-jsonschema/compare/v0.1.1...v0.1.2) [Compare Source](https://togithub.com/cerbos/protoc-gen-jsonschema/compare/v0.1.1...v0.1.2) </details> <details> <summary>doug-martin/goqu (github.com/doug-martin/goqu/v9)</summary> ### [`v9.19.0`](https://togithub.com/doug-martin/goqu/blob/HEAD/HISTORY.md#v9190) [Compare Source](https://togithub.com/doug-martin/goqu/compare/v9.18.0...v9.19.0) - \[FEATURE] Add support for omitempty and omitnil struct tags [#​309](https://togithub.com/doug-martin/goqu/pull/309) - [@​randallmlough](https://togithub.com/randallmlough) </details> <details> <summary>minio/minio-go (github.com/minio/minio-go/v7)</summary> ### [`v7.0.64`](https://togithub.com/minio/minio-go/releases/tag/v7.0.64): Bugfix release [Compare Source](https://togithub.com/minio/minio-go/compare/v7.0.63...v7.0.64) #### What's Changed - Added new supported Bucket Event types by [@​bexsoft](https://togithub.com/bexsoft) in [https://github.com/minio/minio-go/pull/1885](https://togithub.com/minio/minio-go/pull/1885) - Support External Id and Session Token by [@​ekristen](https://togithub.com/ekristen) in [https://github.com/minio/minio-go/pull/1887](https://togithub.com/minio/minio-go/pull/1887) - Link to godoc by [@​klauspost](https://togithub.com/klauspost) in [https://github.com/minio/minio-go/pull/1894](https://togithub.com/minio/minio-go/pull/1894) - Bump golang.org/x/net from 0.14.0 to 0.17.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/minio/minio-go/pull/1889](https://togithub.com/minio/minio-go/pull/1889) - Bump golang.org/x/net from 0.14.0 to 0.17.0 in /examples/minio by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/minio/minio-go/pull/1888](https://togithub.com/minio/minio-go/pull/1888) - Update s3-endpoints.go: add il-central-1 by [@​emaildanwilson](https://togithub.com/emaildanwilson) in [https://github.com/minio/minio-go/pull/1886](https://togithub.com/minio/minio-go/pull/1886) - Update the Go Quickstart README by [@​feorlen](https://togithub.com/feorlen) in [https://github.com/minio/minio-go/pull/1896](https://togithub.com/minio/minio-go/pull/1896) - Add Expires to PutObject opts by [@​vadmeste](https://togithub.com/vadmeste) in [https://github.com/minio/minio-go/pull/1900](https://togithub.com/minio/minio-go/pull/1900) - snowball: Support per object advanced PUT options by [@​vadmeste](https://togithub.com/vadmeste) in [https://github.com/minio/minio-go/pull/1901](https://togithub.com/minio/minio-go/pull/1901) #### New Contributors - [@​ekristen](https://togithub.com/ekristen) made their first contribution in [https://github.com/minio/minio-go/pull/1887](https://togithub.com/minio/minio-go/pull/1887) - [@​dependabot](https://togithub.com/dependabot) made their first contribution in [https://github.com/minio/minio-go/pull/1889](https://togithub.com/minio/minio-go/pull/1889) - [@​emaildanwilson](https://togithub.com/emaildanwilson) made their first contribution in [https://github.com/minio/minio-go/pull/1886](https://togithub.com/minio/minio-go/pull/1886) - [@​feorlen](https://togithub.com/feorlen) made their first contribution in [https://github.com/minio/minio-go/pull/1896](https://togithub.com/minio/minio-go/pull/1896) **Full Changelog**: minio/minio-go@v7.0.63...v7.0.64 </details> <details> <summary>pterm/pterm (github.com/pterm/pterm)</summary> ### [`v0.12.71`](https://togithub.com/pterm/pterm/releases/tag/v0.12.71) [Compare Source](https://togithub.com/pterm/pterm/compare/v0.12.70...v0.12.71) <!-- Release notes generated using configuration in .github/release.yml at master --> #### What's Changed ##### Fixes 🔧 - fix(BulletList): indentation does not work when the item has a linebreak by [@​MarvinJWendt](https://togithub.com/MarvinJWendt) in [https://github.com/pterm/pterm/pull/589](https://togithub.com/pterm/pterm/pull/589) **Full Changelog**: pterm/pterm@v0.12.70...v0.12.71 </details> <details> <summary>vektra/mockery (github.com/vektra/mockery/v2)</summary> ### [`v2.38.0`](https://togithub.com/vektra/mockery/releases/tag/v2.38.0) [Compare Source](https://togithub.com/vektra/mockery/compare/v2.37.1...v2.38.0) #### Changelog - [`446e0bf`](https://togithub.com/vektra/mockery/commit/446e0bf) Merge pull request [#​736](https://togithub.com/vektra/mockery/issues/736) from mateusmarquezini/issue\_729 - [`445f73c`](https://togithub.com/vektra/mockery/commit/445f73c) added new check for no return values - [`8e778e0`](https://togithub.com/vektra/mockery/commit/8e778e0) created a new test to cover the new condition when the test panics [#​729](https://togithub.com/vektra/mockery/issues/729) - [`d0fa1f9`](https://togithub.com/vektra/mockery/commit/d0fa1f9) improvements after code review [#​729](https://togithub.com/vektra/mockery/issues/729) - [`432134c`](https://togithub.com/vektra/mockery/commit/432134c) improvements after code review [#​729](https://togithub.com/vektra/mockery/issues/729) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/cerbos/cerbos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Oğuzhan Durgun <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Oğuzhan Durgun <[email protected]>
Improve the Go Quickstart:
Since this repo doesn't use the Docs staging server, this direct link in GitHub is an easier way to see an overview of changes than reading the diff:
https://github.com/feorlen/minio-go/blob/update-readme-quickstart/README.md
Corresponding docs issue: minio/docs#1042