Giter VIP home page Giter VIP logo

lessons's Issues

PostgresSQL access on rows.Scan fails for varchar fields

Hello Gophercast crew -

Appreciate the lessons. Quite new to Go and been trying out your tutorials. Using Go 1.4 on Ubuntu.

From a Python / Java / SQL background and Go has been a great language.

Getting an error on the rows.Scan - on fields that are VARCHAR in Postgres.
sql: Scan error on column index 1: unsupported driver -> Scan pair: -> *string

Do not get the erro if the fields are CHAR.

I updated the names of libraries for myself and it compiles and such - and even runs.
But get this other error when I get to templates (ie if I pass the above error in Lesson 4).

I get an error in that a field I am using in the struct to store the variables is unexportable.

template: members:9:9: executing "members" at <.ihg_member_id>: ihg_member_id is an unexported field of struct type main.Member

So I am using a struct Members instead of the Books table you showed - but does the same thing.
And I can access Memebers fine if the fields ar CHAR but not VARCHAR.

Your help would be very appreciated.

Thank you.

Lesson 1 creating directories

The video mentions that src bin and pkg have to be created in $GOPATH before using Go.
This is false, the directories are created automatically by the go tool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.