alfiankan / teleterm

Value assigned to a variable is never read before being overwritten SCC-SA4006
Bug risk
Critical
a year ago2 years old
this value of err is never used
34		panic(err)
35	}
36
37	body, err := ioutil.ReadAll(res.Body)38
39	var responseTeleFile FileIdRequest
40	err = json.Unmarshal(body, &responseTeleFile)
this value of err is never used
23			err = os.Mkdir(homePath, os.ModePerm)
24
25			execCmd := new(executor.CommandOutputWriter)
26			_, outErr, err := execCmd.ExecFullOutput(fmt.Sprintf("wget https://github.com/alfiankan/teleterm/raw/main/empty/teleterm.db -P %s", homePath))27			_, outErr, err = execCmd.ExecFullOutput(fmt.Sprintf("wget https://github.com/alfiankan/teleterm/raw/main/empty/config.yaml -P %s", homePath))
28			if err != nil {
29				fmt.Println(outErr)
this value of outErr is never used
23			err = os.Mkdir(homePath, os.ModePerm)
24
25			execCmd := new(executor.CommandOutputWriter)
26			_, outErr, err := execCmd.ExecFullOutput(fmt.Sprintf("wget https://github.com/alfiankan/teleterm/raw/main/empty/teleterm.db -P %s", homePath))27			_, outErr, err = execCmd.ExecFullOutput(fmt.Sprintf("wget https://github.com/alfiankan/teleterm/raw/main/empty/config.yaml -P %s", homePath))
28			if err != nil {
29				fmt.Println(outErr)
this value of err is never used
19			// reconfigure
20			fmt.Println("Fresh Configuring, Please Wait ...")
21			homePath := fmt.Sprintf("%s/.teleterm", os.Getenv("HOME"))
22			err := os.RemoveAll(homePath)23			err = os.Mkdir(homePath, os.ModePerm)
24
25			execCmd := new(executor.CommandOutputWriter)
this value of err is never used
20			fmt.Println("Fresh Configuring, Please Wait ...")
21			homePath := fmt.Sprintf("%s/.teleterm", os.Getenv("HOME"))
22			err := os.RemoveAll(homePath)
23			err = os.Mkdir(homePath, os.ModePerm)24
25			execCmd := new(executor.CommandOutputWriter)
26			_, outErr, err := execCmd.ExecFullOutput(fmt.Sprintf("wget https://github.com/alfiankan/teleterm/raw/main/empty/teleterm.db -P %s", homePath))