Skip to content

Commit 7888a6f

Browse files
author
Pierre SOUCHAY
committed
CollectionTimeout -> WithCollectionTimeout
Signed-off-by: Pierre SOUCHAY <pierre.souchay@pelico.io>
1 parent 0e8d9e3 commit 7888a6f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/postgres_exporter/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func main() {
138138
excludedDatabases,
139139
dsn,
140140
[]string{},
141-
collector.CollectionTimeout(*collectionTimeout))
141+
collector.WithCollectionTimeout(*collectionTimeout))
142142
if err != nil {
143143
logger.Warn("Failed to create PostgresCollector", "err", err.Error())
144144
} else {

collector/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func NewPostgresCollector(logger *slog.Logger, excludeDatabases []string, dsn st
159159
return p, nil
160160
}
161161

162-
func CollectionTimeout(s string) Option {
162+
func WithCollectionTimeout(s string) Option {
163163
return func(e *PostgresCollector) error {
164164
duration, err := time.ParseDuration(s)
165165
if err != nil {

0 commit comments

Comments
 (0)