Fix gofmt warnings

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos 2023-05-09 18:57:14 +01:00
parent 3f2a4e24a7
commit ae58bde985
No known key found for this signature in database
GPG key ID: 01300E5E6D417439
17 changed files with 153 additions and 153 deletions

View file

@ -15,7 +15,7 @@
// The above will store the version in the context and will be available to // The above will store the version in the context and will be available to
// the logger. // the logger.
// //
// Logging // # Logging
// //
// The most useful aspect of this package is GetLogger. This function takes // The most useful aspect of this package is GetLogger. This function takes
// any context.Context interface and returns the current logger from the // any context.Context interface and returns the current logger from the
@ -65,7 +65,7 @@
// added to the request context, is unique to that context and can have // added to the request context, is unique to that context and can have
// request scoped variables. // request scoped variables.
// //
// HTTP Requests // # HTTP Requests
// //
// This package also contains several methods for working with http requests. // This package also contains several methods for working with http requests.
// The concepts are very similar to those described above. We simply place the // The concepts are very similar to those described above. We simply place the

View file

@ -13,7 +13,7 @@
// particularly useful for checks that verify upstream connectivity or // particularly useful for checks that verify upstream connectivity or
// database status, since they might take a long time to return/timeout. // database status, since they might take a long time to return/timeout.
// //
// Installing // # Installing
// //
// To install health, just import it in your application: // To install health, just import it in your application:
// //
@ -35,7 +35,7 @@
// After importing these packages to your main application, you can start // After importing these packages to your main application, you can start
// registering checks. // registering checks.
// //
// Registering Checks // # Registering Checks
// //
// The recommended way of registering checks is using a periodic Check. // The recommended way of registering checks is using a periodic Check.
// PeriodicChecks run on a certain schedule and asynchronously update the // PeriodicChecks run on a certain schedule and asynchronously update the
@ -84,7 +84,7 @@
// return Errors.new("This is an error!") // return Errors.new("This is an error!")
// })) // }))
// //
// Examples // # Examples
// //
// You could also use the health checker mechanism to ensure your application // You could also use the health checker mechanism to ensure your application
// only comes up if certain conditions are met, or to allow the developer to // only comes up if certain conditions are met, or to allow the developer to

View file

@ -29,7 +29,6 @@
// } // }
// } // }
// } // }
//
package auth package auth
import ( import (

View file

@ -185,6 +185,7 @@ func (t *Token) Verify(verifyOpts VerifyOptions) error {
// VerifySigningKey attempts to get the key which was used to sign this token. // VerifySigningKey attempts to get the key which was used to sign this token.
// The token header should contain either of these 3 fields: // The token header should contain either of these 3 fields:
//
// `x5c` - The x509 certificate chain for the signing key. Needs to be // `x5c` - The x509 certificate chain for the signing key. Needs to be
// verified. // verified.
// `jwk` - The JSON Web Key representation of the signing key. // `jwk` - The JSON Web Key representation of the signing key.
@ -192,6 +193,7 @@ func (t *Token) Verify(verifyOpts VerifyOptions) error {
// `kid` - The unique identifier for the key. This library interprets it // `kid` - The unique identifier for the key. This library interprets it
// as a libtrust fingerprint. The key itself can be looked up in // as a libtrust fingerprint. The key itself can be looked up in
// the trustedKeys field of the given verify options. // the trustedKeys field of the given verify options.
//
// Each of these methods are tried in that order of preference until the // Each of these methods are tried in that order of preference until the
// signing key is found or an error is returned. // signing key is found or an error is returned.
func (t *Token) VerifySigningKey(verifyOpts VerifyOptions) (signingKey libtrust.PublicKey, err error) { func (t *Token) VerifySigningKey(verifyOpts VerifyOptions) (signingKey libtrust.PublicKey, err error) {

View file

@ -1,6 +1,5 @@
// Package middleware - cloudfront wrapper for storage libs // Package middleware - cloudfront wrapper for storage libs
// N.B. currently only works with S3, not arbitrary sites // N.B. currently only works with S3, not arbitrary sites
//
package middleware package middleware
import ( import (
@ -38,7 +37,9 @@ var _ storagedriver.StorageDriver = &cloudFrontStorageMiddleware{}
// Optional options: ipFilteredBy, awsregion // Optional options: ipFilteredBy, awsregion
// ipfilteredby: valid value "none|aws|awsregion". "none", do not filter any IP, default value. "aws", only aws IP goes // ipfilteredby: valid value "none|aws|awsregion". "none", do not filter any IP, default value. "aws", only aws IP goes
//
// to S3 directly. "awsregion", only regions listed in awsregion options goes to S3 directly // to S3 directly. "awsregion", only regions listed in awsregion options goes to S3 directly
//
// awsregion: a comma separated string of AWS regions. // awsregion: a comma separated string of AWS regions.
func newCloudFrontStorageMiddleware(storageDriver storagedriver.StorageDriver, options map[string]interface{}) (storagedriver.StorageDriver, error) { func newCloudFrontStorageMiddleware(storageDriver storagedriver.StorageDriver, options map[string]interface{}) (storagedriver.StorageDriver, error) {
// parse baseurl // parse baseurl

View file

@ -435,7 +435,6 @@ func (repositoriesRootPathSpec) pathSpec() {}
// groups of digest folder. It will be as follows: // groups of digest folder. It will be as follows:
// //
// <algorithm>/<first two bytes of digest>/<full digest> // <algorithm>/<first two bytes of digest>/<full digest>
//
func digestPathComponents(dgst digest.Digest, multilevel bool) ([]string, error) { func digestPathComponents(dgst digest.Digest, multilevel bool) ([]string, error) {
if err := dgst.Validate(); err != nil { if err := dgst.Validate(); err != nil {
return nil, err return nil, err

View file

@ -15,7 +15,6 @@ import (
// with version "v2.0" would print the following: // with version "v2.0" would print the following:
// //
// registry github.com/docker/distribution v2.0 // registry github.com/docker/distribution v2.0
//
func FprintVersion(w io.Writer) { func FprintVersion(w io.Writer) {
fmt.Fprintln(w, os.Args[0], Package, Version) fmt.Fprintln(w, os.Args[0], Package, Version)
} }