From 6baffaa67c17bb24e1c6c3a94f7c8089e229f701 Mon Sep 17 00:00:00 2001 From: Varun Dhand <110025628+varundhand@users.noreply.github.com> Date: Sat, 28 Oct 2023 16:26:41 +0530 Subject: [PATCH] fix: typo in rjreader.go --- config/rjreader.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/rjreader.go b/config/rjreader.go index 7fcd88ffe..eb64c1516 100644 --- a/config/rjreader.go +++ b/config/rjreader.go @@ -54,7 +54,7 @@ func isWhiteSpace(c byte) bool { return c == ' ' || c == '\t' || isNewLine(c) || c == 0 } -// ReadEnv reads the enviorment variable +// ReadEnv reads the enviornment variable func ReadEnv(key string) (string, error) { //it shod print a warning not a error if env := os.Getenv(key); env != "" { return env, nil @@ -239,7 +239,7 @@ func (rjr *RjReader) checkMeta() bool { utils.MetaEnv == string(rjr.buf[rjr.indx-1:rjr.indx-1+len(utils.MetaEnv)]) } -// readEnvName reads the enviorment key +// readEnvName reads the enviornment key func (rjr *RjReader) readEnvName(indx int) (name []byte, endindx int) { //0 if not set for indx < len(rjr.buf) { //read byte by byte bit := rjr.buf[indx] @@ -252,7 +252,7 @@ func (rjr *RjReader) readEnvName(indx int) (name []byte, endindx int) { //0 if n return name, indx } -// replaceEnv replaces the EnvMeta and enviorment key with enviorment variable value in specific buffer +// replaceEnv replaces the EnvMeta and enviornment key with enviornment variable value in specific buffer func (rjr *RjReader) replaceEnv(startEnv int) error { midEnv := len(utils.MetaEnv) key, endEnv := rjr.readEnvName(startEnv + midEnv)