From b7672a90d38b3e62d5a4063bc06bd01635c2d48a Mon Sep 17 00:00:00 2001 From: Punit Pandey Date: Sat, 16 Oct 2021 19:15:09 +0530 Subject: [PATCH] initial commit --- command/cli/cli.go | 4 ++-- command/file/file.go | 11 +++++------ main.go | 6 +++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/command/cli/cli.go b/command/cli/cli.go index f1e4d1b..1e19248 100644 --- a/command/cli/cli.go +++ b/command/cli/cli.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "awesomeProject2/command" - "awesomeProject2/handler" + "communication/command" + "communication/handler" ) const ( diff --git a/command/file/file.go b/command/file/file.go index 1474666..9ec1c58 100644 --- a/command/file/file.go +++ b/command/file/file.go @@ -2,7 +2,6 @@ package file import ( "bufio" - "errors" "io" "log" "os" @@ -11,14 +10,13 @@ import ( "strings" "sync" - "awesomeProject2/command" - "awesomeProject2/handler" + "communication/command" + "communication/handler" ) const ( - FileError = "error in opening file" - ExitFlag = "exit" - ReadFlag = "done" + ExitFlag = "exit" + ReadFlag = "done" ) var ( @@ -98,6 +96,7 @@ func NewClient(handleProvider handler.HandleProvider, configs ...string) (comman } }() once.Do(func() { + var err error fileInstance.handler = handleProvider if len(configs) > 0 { fileInstance.readLocation, err = os.OpenFile(configs[0], os.O_RDONLY, 777) diff --git a/main.go b/main.go index 86a82aa..a1d60c1 100644 --- a/main.go +++ b/main.go @@ -3,9 +3,9 @@ package main import ( "fmt" - "awesomeProject2/command" - "awesomeProject2/command/cli" - "awesomeProject2/handler" + "communication/command" + "communication/command/cli" + "communication/handler" ) func main() {