Skip to content

Commit

Permalink
refactoring naming variabel
Browse files Browse the repository at this point in the history
  • Loading branch information
alfiankan committed Oct 4, 2021
1 parent 43ef8a4 commit ef1d09e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
)

// download file
// download filell
func DownloadFile(filepath string, url string) error {

// Get the data
Expand Down
12 changes: 6 additions & 6 deletions handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var result []byte
var msg *tb.Message
var errResult error
var er error
var kirim string
var send string
var elapseds string

var lockId int
Expand Down Expand Up @@ -76,9 +76,9 @@ func executionwf(tmd []string) {
bot.Send(msg.Sender, "Maybe, errorr check your command")
fmt.Println(er)
}
kirim := result
send := result
eerr(errResult)
d1 := kirim
d1 := send
errResult = ioutil.WriteFile("./log/log.txt", d1, 0644)
eerr(errResult)
a := &tb.Document{File: tb.FromDisk("./log/log.txt"), MIME: ".txt", FileName: "cmd_exec_at_" + time.Now().String() + ".txt"}
Expand All @@ -97,10 +97,10 @@ func execution(tmd []string) {
bot.Send(msg.Sender, "Maybe errorr, check your command")
fmt.Println(er)
}
kirim = string(result)
fmt.Println(kirim)
send = string(result)
fmt.Println(send)

bot.Send(msg.Sender, kirim)
bot.Send(msg.Sender, send)
fmt.Println("Elapsed time" + elapseds)
}

Expand Down

0 comments on commit ef1d09e

Please sign in to comment.