From b24255db5e3f2ea78889e8c78f68894a5b0b784e Mon Sep 17 00:00:00 2001 From: Erkan Ozsoy Date: Mon, 3 Jul 2023 17:03:45 +0300 Subject: [PATCH] README.md updated for comments --- etcd/README.md | 5 +++++ etcd/config.go | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/etcd/README.md b/etcd/README.md index 44dbb51a..752a0c10 100644 --- a/etcd/README.md +++ b/etcd/README.md @@ -51,10 +51,15 @@ store := etcd.New(Config{ ### Config ```go type Config struct { + // Endpoints is a list of URLs. Endpoints []string + // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration + // Username is a username for authentication. Username string + // Password is a password for authentication. Password string + // Context is the context for the client. Context context.Context } ``` diff --git a/etcd/config.go b/etcd/config.go index ceaa3d76..fb17673d 100644 --- a/etcd/config.go +++ b/etcd/config.go @@ -7,11 +7,16 @@ import ( // Config defines the config for storage. type Config struct { - Endpoints []string + // Endpoints is a list of URLs. + Endpoints []string + // DialTimeout is the timeout for failing to establish a connection. DialTimeout time.Duration - Username string - Password string - Context context.Context + // Username is a username for authentication. + Username string + // Password is a password for authentication. + Password string + // Context is the context for the client. + Context context.Context } // ConfigDefault is the default config