Questions tagged as 'golang'

1
answer

___ ___ erkimt Message "Invalid object name 'dbo.table' SQL Server Go Lang ______ qstntxt ___

I'm trying to use a select in my SQL Server Database that I own in Azure.

I'm using the Driver: link .

However, I get a message back:

  

mssql: Invalid object name 'dbo.table'.

Below my code, where am I wrong?

%pre%

Return:

  

C: \ Go \ bin \ go.exe run B: \ go \ gocode \ src \ main \ connect-bd.go
  2017/02/25 15:59:33 Main:
  2017/02/25 15:59:33 Opening
  2017/02/25 15:59:33 Opened
  2017/02/25 15:59:33 Pinging
  2017/02/25 15:59:33 Pinged
  2017/02/25 15:59:33 mssql: Invalid object name 'dbo.tbPessoa'.
  exit status 1

    
______azszpr186720___

In my connect string, I was missing out on which bank to use %code%

Done this connected in a good!

Without this information Select was being done in the default SQL master database.

It looks like this:

%pre%     

___
I'm trying to use a select in my SQL Server Database that I own in Azure. I'm using the Driver: link . However, I get a message back:    mssql: Invalid object name 'dbo.table'. Below my code, where am I wrong? package main impor...
asked by 25.02.2017 / 20:18
1
answer

Problem Query Beego

I'm having trouble setting up a Query on Go, using the Beego framework. Error:    2018/12/20 09: 21: 32.104 [C] [asm_amd64.s: 522] Handler crashed with error runtime error: invalid memory address or nil pointer dereference   2018/12/20 09:...
asked by 20.12.2018 / 12:33
3
answers

Go Language Settings

I need to do a college job and chose to do it in the Go language because I wanted to learn a new language. Yesterday I installed the .msi of the site and saw that I needed to configure the variables GOPATH , PATH and GOROOT ....
asked by 30.09.2015 / 23:25
1
answer

Whole value in hours with Golang

I'm trying to compare 2 dates that have only 1 minute difference between them and apply a price rule based on that time where; Each minute should have the value of $ 0.10 st := time.Date(2019, 9, 21, 10, 10, 10, 0, time.UTC) en := time.Date...
asked by 01.10.2018 / 01:52
1
answer

Assigning values to an array of struct in Golang

I'm starting to learn go and need to fill popular the different structs with their values. I thought about creating an array of structs and trying to use a for to fill in the fields but a invalid operation: p[1].burst[i] (type int does not sup...
asked by 31.10.2018 / 22:39
1
answer

Cross-Origin Golang with gorilla / mux

In my application I am using the gorilla/mux package next to gorilla/handlers to enable / configure CORS of my application, I currently have an api in GO and a frontend application in vue , in my application...
asked by 31.05.2018 / 17:25
1
answer

go (golang) error giving the command go install - unexpected directory layout

I'm new to go (golang) I'm trying to start an application but without success, it returns the following error when giving the command go install: unexpected directory layout: import path: github.com/gorilla/handlers root: D:\Bi...
asked by 19.03.2018 / 15:51
1
answer

How to set $ GOPATH in existing folder?

I want to install a package in a project on go go get -u github.com/gorilla/mux But type this command in Ubuntu% package github.com/gorilla/mux: cannot download, $GOPATH not set. For more details see: go help gopath I...
asked by 01.02.2018 / 23:56
1
answer

Assign method to custom types in Golang

I have a code where I need to perform several replaces and for this I did the following: exemplo := "Olá, meu nome é xpto, na verdade xpto da silva xpto" formated := strings.Replace(exemplo, "xpto", "Fulano") formated := strings.Replace...
asked by 18.02.2018 / 17:25
2
answers

Import / embed other files - go (golang)

I'm studying go (golang) and I have a question about importing files, the doubt is about something "elemental" but I could not find anything specifically about it. I have a package ( test ) arranged like this: test -> main.go ->...
asked by 30.10.2017 / 03:36