chore: update linter.

This commit is contained in:
Fernandez Ludovic 2020-05-09 15:50:40 +02:00
parent 9023b046d8
commit 7414ec328c
12 changed files with 20 additions and 18 deletions

View File

@ -31,6 +31,8 @@
"scopelint",
"wsl",
"gomnd",
"testpackage",
"goerr113",
]
[issues]

View File

@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
)
// boltdbCmd represents the boltdb command
// boltdbCmd represents the boltdb command.
var boltdbCmd = &cobra.Command{
Use: "boltdb",
Short: "Dump the content of BoltDB.",

View File

@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
)
// consulCmd represents the consul command
// consulCmd represents the consul command.
var consulCmd = &cobra.Command{
Use: "consul",
Short: "Dump the content of Consul.",

View File

@ -5,7 +5,7 @@ import (
"github.com/spf13/cobra/doc"
)
// docCmd represents the doc command
// docCmd represents the doc command.
var docCmd = &cobra.Command{
Use: "doc",
Short: "Generate documentation",

View File

@ -11,7 +11,7 @@ import (
"github.com/spf13/cobra"
)
// etcdCmd represents the etcd command
// etcdCmd represents the etcd command.
var etcdCmd = &cobra.Command{
Use: "etcd",
Short: "Dump the content of etcd.",

View File

@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
)
// fileCmd represents the file command
// fileCmd represents the file command.
var fileCmd = &cobra.Command{
Use: "file",
Short: `Dump the content of the "acme.json" file.`,

View File

@ -14,7 +14,7 @@ import (
"github.com/spf13/cobra"
)
// kvCmd represents the kv command
// kvCmd represents the kv command.
var kvCmd = &cobra.Command{
Use: "kv",
Short: `Dump the content of a KV store.`,

View File

@ -16,7 +16,7 @@ import (
var cfgFile string
// rootCmd represents the base command when called without any subcommands
// rootCmd represents the base command when called without any subcommands.
var rootCmd = &cobra.Command{
Use: "traefik-certs-dumper",
Short: "Dump Let's Encrypt certificates from Traefik.",

View File

@ -13,7 +13,7 @@ var (
date = "I don't remember exactly"
)
// versionCmd represents the version command
// versionCmd represents the version command.
var versionCmd = &cobra.Command{
Use: "version",
Short: "Display version",

View File

@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
)
// zookeeperCmd represents the zookeeper command
// zookeeperCmd represents the zookeeper command.
var zookeeperCmd = &cobra.Command{
Use: "zookeeper",
Short: "Dump the content of zookeeper.",

View File

@ -6,7 +6,7 @@ import (
v1 "github.com/ldez/traefik-certs-dumper/v2/dumper/v1"
)
// CertificateOld is used to store certificate info
// CertificateOld is used to store certificate info.
type CertificateOld struct {
Domain string
CertURL string
@ -15,7 +15,7 @@ type CertificateOld struct {
Certificate []byte
}
// AccountOld is used to store lets encrypt registration info
// AccountOld is used to store lets encrypt registration info.
type AccountOld struct {
Email string
Registration *registration.Resource
@ -26,18 +26,18 @@ type AccountOld struct {
HTTPChallenge map[string]map[string][]byte
}
// DomainsCertificates stores a certificate for multiple domains
// DomainsCertificates stores a certificate for multiple domains.
type DomainsCertificates struct {
Certs []*DomainsCertificate
}
// ChallengeCert stores a challenge certificate
// ChallengeCert stores a challenge certificate.
type ChallengeCert struct {
Certificate []byte
PrivateKey []byte
}
// DomainsCertificate contains a certificate for multiple domains
// DomainsCertificate contains a certificate for multiple domains.
type DomainsCertificate struct {
Domains v1.Domain
Certificate *CertificateOld

View File

@ -5,7 +5,7 @@ import (
"github.com/go-acme/lego/v3/registration"
)
// StoredData represents the data managed by the Store
// StoredData represents the data managed by the Store.
type StoredData struct {
Account *Account
Certificates []*Certificate
@ -13,20 +13,20 @@ type StoredData struct {
TLSChallenges map[string]*Certificate
}
// Certificate is a struct which contains all data needed from an ACME certificate
// Certificate is a struct which contains all data needed from an ACME certificate.
type Certificate struct {
Domain Domain
Certificate []byte
Key []byte
}
// Domain holds a domain name with SANs
// Domain holds a domain name with SANs.
type Domain struct {
Main string
SANs []string
}
// Account is used to store lets encrypt registration info
// Account is used to store lets encrypt registration info.
type Account struct {
Email string
Registration *registration.Resource