1,phpmyadmin
Error during session start; please check your PHP and/or webserver log file and c
需要設置參考 php設置的session_path 保存路徑
參考博客 https://blog.csdn.net/qq_19004627/article/details/80818728
2,docker 錯誤
docker: Error response from daemon: pull access denied for test, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'
需要 docker login
docker: Error response from daemon: pull access denied for test, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: yangxiuwen
Password:
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
需要去docker hub創建一個賬號
3,nginx 錯誤
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
nginx -t 配置啓動錯誤
4,初學者出現的一些go的語法問題
cannot refer to unexported name controller.test
比較奇怪的是,其他函數可以被引用。
後來發現一個golang的語法:模塊中要導出的函數,必須首字母大寫。
not enough arguments in call to controller.Test
have ()
需要傳入對應的參數 不然就報錯
listen tcp: address 8088: missing port in address
原來是我在 8080前面少寫了一個 : 真的是比實習還不如的go實習生的
none declared and not used
未申報未使用
controller.Test() used as value
沒有在控制器return
too many arguments to return
have (*tools.ResponseBean)
want ()
go裏,函數有返回值則必須聲明,而有返回值的函數就必須返回。。。go可是強類型語言啊。。。
invalid operation: dbUser + ":" (mismatched types interface {} and string)
go語言語法需要抓換成相同得格式
https://www.bbsmax.com/A/MAzALlOed9/ 說得最好的博客
connect mysql fail ! [sql: unknown driver "mysql"
需要引入 _ "github.com/go-sql-driver/mysql"