[go-nuts] Having trouble in running a go-git api example

2022-10-12 Thread PK
Hi, I am trying to run example provided here(https://github.com/go-git/go-git/tree/master/_examples) 1) firstly I run the clone example by cloning a repo(https://github.com/go-git/go-git/blob/master/_examples/clone/auth/basic/access_token/main.go). (it was successful) 2) Then I run the commit

Re: [go-nuts] The effect go test -v flag on local directory mode and package list mode

2022-10-12 Thread jingguo yao
Got it. On Thu, Oct 13, 2022 at 7:13 AM Ian Lance Taylor wrote: > On Tue, Oct 11, 2022 at 8:42 PM Jingguo Yao wrote: > > > > I have the following directory layout: > > > > ├── bar > > │ └── bar_test.go > > ├── foo > > │ └── foo_test.go > > ├── go.mod > > └── go.sum > > > > > > foo_test.go:

Re: [go-nuts] The effect go test -v flag on local directory mode and package list mode

2022-10-12 Thread Ian Lance Taylor
On Tue, Oct 11, 2022 at 8:42 PM Jingguo Yao wrote: > > I have the following directory layout: > > ├── bar > │ └── bar_test.go > ├── foo > │ └── foo_test.go > ├── go.mod > └── go.sum > > > foo_test.go: > package main > > import ( > "fmt" > "testing" > ) > > func TestHelloWorld(t *testin

Re: [go-nuts] CLA Signing for contributing is broken

2022-10-12 Thread Ian Lance Taylor
On Wed, Oct 12, 2022 at 9:05 AM Adrian Lungu wrote: > > I've made a PR recently for the oauth2 golang repo, and stumbled into the CLA > part of the process. After signing the required documents, I read that we're > supposed to trigger a rescan, but following the link provided, I end up on a > p

Re: [go-nuts] How to add zero after a decimal point in float datatype

2022-10-12 Thread 'Joshua Christudoss' via golang-nuts
Use   | %.2f     in   fmt.printf | Thanks & Regards Joshua Christudoss In Christ | For Christ | By Christ Sent from Yahoo Mail on Android On Thu, 13 Oct 2022 at 1:20 am, Jan Mercl<0xj...@gmail.com> wrote: On Wed, Oct 12, 2022 at 9:31 PM pravin chaudhary wrote: > I need to add zero

Re: [go-nuts] How to add zero after a decimal point in float datatype

2022-10-12 Thread Jan Mercl
On Wed, Oct 12, 2022 at 9:31 PM pravin chaudhary wrote: > I need to add zero after a decimal point to a float datatype but not able to > do. > > Required float value = 5.00 but getting as 5 > > Datatype should be float only!! > > Any help will be much appreciated! Is this perhaps what you're lo

[go-nuts] How to add zero after a decimal point in float datatype

2022-10-12 Thread pravin chaudhary
I need to add zero after a decimal point to a float datatype but not able to do. Required float value = 5.00 but getting as 5 Datatype should be float only!! Any help will be much appreciated! Thanks, Pravin -- You received this message because you are subscribed to the Google Groups "golan

Re: [go-nuts] Zero-sized data type

2022-10-12 Thread 'Axel Wagner' via golang-nuts
You can re-order the fields to get the desired effect: https://go.dev/play/p/E1KTqVp0i-v On Wed, Oct 12, 2022 at 6:01 PM Richiise Nugraha wrote: > Hi, I am looking for zero-sized data type, something like Flexible Array > Member. > The size of `struct {}` is indeed zero, but for what reason when

Re: [go-nuts] Zero-sized data type

2022-10-12 Thread Jan Mercl
On Wed, Oct 12, 2022 at 6:01 PM Richiise Nugraha wrote: > Hi, I am looking for zero-sized data type, something like Flexible Array Member. > The size of `struct {}` is indeed zero, but for what reason when it's inside a struct with another member say (https://go.dev/play/p/DpydJIke7dS): > > type

[go-nuts] JWT Updated and ask for advice

2022-10-12 Thread Gerardo Bustani
Hi good afternoon golang dev's, I'm starting in golang blogs and I don't where to post this kind of questions, Learning fiber framework and JWT Auth I'm getting in the register Func and Login Func the user Id is saving correctly on DB. The cookie and JWT are getting correctly and disply the coo

[go-nuts] Tracking which connection is used to make an HTTP request

2022-10-12 Thread Christian Worm Mortensen
I have created an http.Client with a custom TLS dialer. The custom TLS dialer creates a *tls.Conn and while doing this, it logs out a lot of information such as which server is used. Now, when I make an HTTP request, I want to log out which dial produced the *tls.Conn the HTTP request ended up

[go-nuts] CLA Signing for contributing is broken

2022-10-12 Thread Adrian Lungu
Hello! I've made a PR recently for the oauth2 golang repo, and stumbled into the CLA part of the process. After signing the required documents, I read that we're supposed to trigger a rescan, but following the link provided, I end up on a page where I get: > 400. That's an error. That's all we

[go-nuts] Zero-sized data type

2022-10-12 Thread Richiise Nugraha
Hi, I am looking for zero-sized data type, something like Flexible Array Member. The size of `struct {}` is indeed zero, but for what reason when it's inside a struct with another member say (https://go.dev/play/p/DpydJIke7dS): type C struct { Pre uint64 Inner struct{} } That struct s

Re: [go-nuts] workspace question

2022-10-12 Thread Steve Roth
Thank you, Jan. Apparently where I went wrong was assuming that the dependency had to be listed in go.mod. (i.e., using the names from your example, foo/go.mod needed to have a "require bar" in it). That is what I was struggling to achieve; it never occurred to me that it could be omitted. I'm

[go-nuts] go:embed question

2022-10-12 Thread Endre Simo (esimov)
I know that //go:embed directive reads the content of the embedable file at compile time. Now if that's the case I wondering if you are running a Go executable with "go run" at the same time while you are downloading like go run github.com/user/projectname@latest (which should embed an external