doulan3966 2019-08-24 02:35
浏览 136
已采纳

运行Hello Couchbase应用程序时出现紧急运行时错误[关闭]

Installed go SDK 1.6 following the instructions given here: https://docs.couchbase.com/go-sdk/current/start-using-sdk.html Created Hello Couchbase application as listed on the above page. While running the application, the program panics at the line :slight_smile: for rows.Next(&row) { and produces the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x12d66b2]

Go version prints the following: go version go1.12.9 darwin/amd64 macOS version 10.14.6

  • 写回答

1条回答 默认 最新

  • dongmiao4733 2019-08-24 03:30
    关注

    Once you’ve installed the SDK you can run this simple code snippet showcasing some of its features.

    Error checking has been omitted for brevity.

    https://docs.couchbase.com/go-sdk/current/start-using-sdk.html


    In Go, always check for errors. If you check for errors, what errors occur?

    The error

    panic: runtime error: invalid memory address or nil pointer dereference
    

    often indicates that an error was ignored.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵