Hi,
Yes, there are some gotchas involved with setting up VS Code with the Go
project. The most common fix is to make sure that the go command resolved
from PATH is the go command built via src/make.bash. There are some more
details
at
https://github.com/golang/tools/blob/master/gopls/doc/adva
Hi sunto,
I am facing the same problem. Have you found a solution?
Thanks.
On Wednesday, 8 May 2019 at 08:25:53 UTC+1 alex wrote:
> > This site can’t be reached
> > site took too long to respond.
>
> Where is this coming from, some kind of a client?
>
> > How come the autocert TLS handshake try
Hi,
What's the error ?
I tested your code in PlayGround and it worked fine...
El miércoles, 2 de febrero de 2022 a las 8:18:45 UTC-5,
kryptic...@gmail.com escribió:
> Have you tried running the program itself?
>
> On Wednesday, February 2, 2022 at 6:45:02 PM UTC+5:30 shaown@gmail.com
> wr
Have you tried running the program itself?
On Wednesday, February 2, 2022 at 6:45:02 PM UTC+5:30 shaown@gmail.com
wrote:
> [image: Capture.PNG][image: Capture1.PNG]
>
> I am new to golang. Here is the problem in my code. I don't know how to
> solve it. I thought my code is ok but it shows a
You are right. Thanks for the correction. Import path is the correct Go
term.
On Monday, May 25, 2020 at 12:04:16 PM UTC+7, Jan Mercl wrote:
>
> On Sun, May 24, 2020 at 6:58 AM Henry >
> wrote:
> > To create a Go Module, step inside your project folder, and type go mod
> init where is the qu
On Sun, May 24, 2020 at 6:58 AM Henry wrote:
> To create a Go Module, step inside your project folder, and type go mod init
> where is the qualified name of your project. For
> instance, if you want to call your project "github.com/henry/myproject", then
> inside your myproject folder, type g
Here is a brief tutorial for those new to Go Module. This is by no means a
comprehensive guide to Go Module, but I hope this should be enough to get
you started.
What is Go Module, and why you should be using one? Go Module is a
dependency management tool. The primary benefit of Go Module is th
I would work through
https://golang.org/doc/code.html
- Amnon
On Friday, 22 May 2020 12:59:03 UTC+1, lj0...@gmail.com wrote:
>
> It looks like I am not only one to struggle with (new?) go modules.
> I still consider me as novice to GO but the major problem is as usual, the
> focus.
>
> 1. Mod
It looks like I am not only one to struggle with (new?) go modules.
I still consider me as novice to GO but the major problem is as usual, the
focus.
1. Modules are complicated to understand
2. Lack of examples (of real use, not just POC)
3. Focus on extra (scale up) details (that are surely im
Interesting. At first sight this should work.
You definitely don't need a go.mod file in ~HOME/src/myrepo/cmd/cmd1
Which go version are you running?
What is your $GOPATH set to?
What output does cd ~HOME/src/myrepo; go build give?
The usual convention is to push the code in a VCS such as githu
Hi Folks,
Made some progress.
I removed the "Foo" routine (it was the last call I made to Export()) and
the "Ping" routine I added using the above routine worked. So it would
appear that each call to Export() overwrites the last, thus it is not
cumilitive as I had expected. Now I'm focused on
On Tuesday, November 19, 2019 at 11:21:17 AM UTC-5, Ken Bassford wrote:
>
> Hi Folks,
>
> I have been trying to implement godbus's Export function to no avail.
> Looking at server.go (under the examples folder) is not very helpful as an
> inspection of export.go contains what appear to be chea
Em sexta-feira, 19 de julho de 2019 10:39:03 UTC-3, veeres...@gmail.com
escreveu:
>
> would anyone help me out how to learn go lang more practically , may be
> some resources . I want to understand go lang more practically , with some
> great examples.
>
> thank you!
>
If you have basic unders
This is my outline of beginner hints:
https://github.com/glycerine/thinkgo
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.c
Two books immediately come to mind
(1) Donovan & Kernighan "The Go Programming Language", 2016
(2) Tapir Liu "Go 101", 2019 [https://go101.org/]
Book (1) is to Go what K&R is to C. The book (2) is a useful complementary
exposition. Both books assume some familiarity with programming in genera
Brian's list is good.
I started with the tour and picked relatively simple tools I wanted to
write, then looked up what I needed as projects advanced. My list of GitHub
Go projects is getting unwieldy now, a few years later. It's an addiction.
Just start with simple projects and set some increa
I only got mine working 99% of the time with a language server configured
in my settings:
{
"go.useLanguageServer": true,
"go.languageServerExperimentalFeatures": {
"diagnostics": true // for diagnostics as you type
},
"[go]": {
"editor.snippetSuggestions": "none",
"editor.formatOnSave": true,
"e
> This site can’t be reached
> site took too long to respond.
Where is this coming from, some kind of a client?
> How come the autocert TLS handshake trying to connect my home IP address
autocert doesn't connect anywhere except the ACME directory, Let's Encrypt
being most common I guess.
Most li
>
> Anyway, thanks for try to help!
>
Actually I was able to instal Go on my mac computer, it took only 10
minutes))), so I will continue to study there ;)
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
I'm sorry that I can't help more. It appears to me that the go builder
was able to create some of the temporary files it needs, but not
others. This is a very strange situation that I have not seen before.
Akin to having a full disk or otherwise exhausting the storage
availability.
I do not know h
Ok there is one file in
E:\temp\go-build828919622\b001\importcfg.link
end is empty in
E:\temp\go-build828919622\b001\exe
this is content of importcfg.link
packagefile
hello=C:\Users\Avetis\AppData\Local\go-build\ae\aecfeab49f117df031d74e0ca3aad783ba25f0524b981cbb74a2db671205fadd-d
packagefile fmt=
> PS F:\GoWorckspace\src\hello> go build -work
> WORK=E:\temp\go-build828919622
> open E:\temp\go-build828919622\b001\exe\a.out.exe: The system cannot find the
> file specified.
once you have done this you should be able to cd to
E:\temp\go-build828919622 and look around to see if any files have
GOPATH = F:\GoWorckspace
GOPATH dir structure is:
-bin/
-pkg/
-src/
-hello/
hello.go
This is my home computer and cause is not an antivirus programm, I tried to
reapit everising with it uninstalled.
And here is resul running build command with -work argument
PS F:\GoWorckspace\s
> PS F:\GoWorckspace\src\hello> go install
> open E:\temp\go-build447177998\b001\exe\a.out.exe: The system cannot find the
> file specified.
is this a school or work computer? if yes then a group policy may have
disabled the execution of exe files. supply the "-work" argument to go
build. it will
It could be due to some anti-virus scanner deleting files.
Here is the relevant issue : https://github.com/golang/go/issues/26195
On Monday, 29 April 2019 22:02:33 UTC-7, Avetis Sargsian wrote:
>
> I set GOTMPDIR to E:\temp folder
>>
> and here is the result
>
> PS F:\GoWorckspace\src\hello> go i
>
> I set GOTMPDIR to E:\temp folder
>
and here is the result
PS F:\GoWorckspace\src\hello> go install
open E:\temp\go-build447177998\b001\exe\a.out.exe: The system cannot find
the file specified.
PS F:\GoWorckspace\src\hello> go build
open E:\temp\go-build140959642\b001\exe\a.out.exe: The sys
What is the output of your "go build" under the dir?
Please give a pre and after capture.
On Sunday, April 28, 2019 at 6:45:20 AM UTC-7, Avetis Sargsian wrote:
>
> Hi everyone, as you can see from the topic I am new to Go
>
> I follow the instruction on this page
> https://golang.org/doc/code.ht
try setting GOTMPDIR. not sure what this corresponds to on windows,
but it will change where the go tool will create its temp files:
$ go run -x t.go
WORK=/var/folders/sp/06p28g2d0vs7gd2vhf26wl9mgn/T/go-build126372523
[...]
$ GOTMPDIR=/tmp/go go run -x t.go
WORK=/tmp/go/go-build661115935
[...]
Unfortunately changin GOCACHE variable didn't help
> PS F:\GoWorckspace\src\hello> go env
> set GOARCH=amd64
> set GOBIN=F:\GoWorckspace\bin
> set GOCACHE=F:\temp
> set GOEXE=.exe
> set GOFLAGS=
> set GOHOSTARCH=amd64
> set GOHOSTOS=windows
> set GOOS=windows
> set GOPATH=F:\GoWorckspace
> set G
There is a problem with your C drive. Go uses it to store temporary files.
The error messages says it cannot access a file that Go should have created
there. It's either a full drive or a permission issues. You can change the
location by changing the GOCACHE variable
--
You received this mess
Well, I don't have experience in Windows, but I'd suggest you to try:
1) get out of your GOPATH or set GO111MODULES=on
2) go mod init or go mod init hello
3) go mod tidy
4) go run main.go or go build && ./hello
Also, have a look at https://github.com/golang/go/wiki/Modules#quick-start
good luck!
First off, there is something really wrong with your post. Colors make it
almost unreadable. Please stick to non-colored (black) text, and for output
text please paste text directly, or use the code block feature provided by
the google groups website.
Have you looked at the file "C:\Users\Gini
Then just do
type Generic struct{
name string
}
func (*Generic) GenericMethod() {
fmt.Printf(name)
}
If you want to access name from p1
type Generic struct{
Name string
}
func (g *Generic) GenericMethod() {
fmt.Printf(g.Name)
}
//package p1
func (x *P1data) F1() {
x.Generic.Name = "as
Hi Alex,
Thanks for the response. Apologies for the confusion. The Generic method
indeed uses struct fields from P1data/P2data struct(they are all same
structs). Can I still achieve this? From the below. GenericMethod should
read name field from structs.
//package p1
type P1data struct {
name
If GenericMethod is truly the same, as in not even using the struct fields
from P1data/P2data then there is a way. You just need to create a new
struct type in package main that implements GenericMethod and then in
packages p1 and p2 you embed the struct and thus expose the method.
package main
> var testuser string = string(user.Username)
you don't need the conversion. user.Username is already a string.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
I figured out this issue. I was calling the struct and needed to call one
specific element of the struct. Then I assign it to a string.
user, err := user.Current()
if err != nil {
log.Fatal(err)
}
var testuser string = string(user.Username)
if testuser == "root" || tes
37 matches
Mail list logo