strconv.Atoi() throwing error when given a string

The error is telling you that the two return values from strconv.Atoi (int and error) are used in a single value context (the assignment to time). Change the code to:

   time, err := strconv.Atoi(times)
   if err != nil {
      // Add code here to handle the error!
   }

Use the blank identifier to ignore the error return value:

   time, _ := strconv.Atoi(times)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)