[go-nuts] methods on C types

2019-04-17 Thread djadala
Hi, where is documented that methods can be created on C types ? This works with go1.12.4, linux: https://play.golang.org/p/gXpHCFOgDDg package main import ( "C" "fmt" ) func (i *C.int) Inc() { *i++ } func main() { var i C.int i.Inc() fmt.Println(i) } Thanks -- You

Re: [go-nuts] Re: fatal error: 'config.h' file not found

2019-04-17 Thread Lucio
Is it likely that *syslogd new generation* needs to be installed, together with its development libraries, *before* it can be included in a Go project? Or, quite possibly, just the development libraries? Lucio. -- You received this message because you are subscribed to the Google Groups "gola

Re: [go-nuts] Re: fatal error: 'config.h' file not found

2019-04-17 Thread Ian Lance Taylor
On Wed, Apr 17, 2019 at 4:59 AM Nitish Saboo wrote: > > Made recommended changes to the file main.go.You can see the file in my > repository : https://github.com/nitishsaboo/Testing > > Now 'go build -x' is failing with the following error: > > WORK=/tmp/go-build838755651 > mkdir -p $WORK/b001/ >

Re: [go-nuts] cracking the go language aplication

2019-04-17 Thread Tyler Compton
Could you provide some more details on what it is you want to do? Are you looking to decompile a Go executable? On Wed, Apr 17, 2019 at 12:23 PM smn shilla wrote: > Hi all > Please anyone who know to crack the go application.exe please assist me > > -- > You received this message because you are

Re: [go-nuts] Interaction between Modules and GOPATH

2019-04-17 Thread andrey mirtchovski
> So do *not* use go get when manually cloning the project then I take it? That is correct. For most developers it would be one or more repositories that contain many modules, not all of which would be go-gettable anyway. Also note that "go get" in module mode (outside of GOPATH) will unpackage w

Re: [go-nuts] Interaction between Modules and GOPATH

2019-04-17 Thread Ian Bruene
On 4/17/19 2:50 PM, andrey mirtchovski wrote: If you are fetching it with "go get" then that's presumably because it's a dependency required by another package or module, in which case the go command will use the correct place for it based on whether "go get" was run inside a module directory (

Re: [go-nuts] Pointer based API and constants literals, how to best handle it?

2019-04-17 Thread whitehexagon via golang-nuts
Thanks Jim, and for the sympathy :) I'm almost tempted to use the REST API and bypass the SDK... I already implemented a missing Cognito Provider using the web API, and it seemed friendlier than this. It would be one less dependency too, since I'm deploying to AWS Lambda and I'm already at 1

Re: [go-nuts] Interaction between Modules and GOPATH

2019-04-17 Thread andrey mirtchovski
> This is all fine and good until the project is fetched with a go get command, > which dumps everything directly into GOPATH, thereby preventing it from > fetching dependencies. If you are fetching it with "go get" then that's presumably because it's a dependency required by another package or

[go-nuts] Interaction between Modules and GOPATH

2019-04-17 Thread Ian Bruene
I recently converted a project from residing under GOPATH + using a vendor/ directory, to using the new Module system. As I understand the system, and what I could discover from testing as I did the conversion, is that the two systems are mutually exclusive: using modules completely ignores ven

Re: [go-nuts] Pointer based API and constants literals, how to best handle it?

2019-04-17 Thread Jim Ancona
Having used the AWS SDK, I feel your pain. They do have built-in helper methods, e.g. https://docs.aws.amazon.com/sdk-for-go/api/aws/#String, so at least you don't have to define your own. Jim On Wed, Apr 17, 2019 at 2:22 PM whitehexagon via golang-nuts < golang-nuts@googlegroups.com> wrote: > I

[go-nuts] cracking the go language aplication

2019-04-17 Thread smn shilla
Hi all Please anyone who know to crack the go application.exe please assist me -- 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...@googlegroup

[go-nuts] Pointer based API and constants literals, how to best handle it?

2019-04-17 Thread whitehexagon via golang-nuts
I'm still very new to Go, so apologies if this is obvious. I'm porting some code over to Go, and the provided SDK I'm working with seems to want pointers everywhere. However a lot of the values are constant / literals. So for example storing some data in the DB: https://docs.aws.amazon.com/

[go-nuts] Re: Is it possible to lazy duplicate the underlying bytes for coversion []byte(aString) on demand at runtime?

2019-04-17 Thread T L
On Wednesday, April 17, 2019 at 10:55:10 AM UTC-4, T L wrote: > > For a byte slice with a negative cap, when the followings happen, > a duplication should be performed and its cap should be changed to > positive: > * the elements of the slices are modified > * the slice is assigned to another sl

[go-nuts] Re: Is it possible to lazy duplicate the underlying bytes for coversion []byte(aString) on demand at runtime?

2019-04-17 Thread T L
On Wednesday, April 17, 2019 at 10:55:10 AM UTC-4, T L wrote: > > For a byte slice with a negative cap, when the followings happen, > a duplication should be performed and its cap should be changed to > positive: > * the elements of the slices are modified > * the slice is assigned to another sl

[go-nuts] Re: Is it possible to lazy duplicate the underlying bytes for coversion []byte(aString) on demand at runtime?

2019-04-17 Thread T L
For a byte slice with a negative cap, when the followings happen, a duplication should be performed and its cap should be changed to positive: * the elements of the slices are modified * the slice is assigned to another slice, * another slice is derived from the slice. * the slice is used as the fi

[go-nuts] 紧急!!中国一线互联网公司招聘云容器GO研发技术Lead

2019-04-17 Thread chandler song
中国一线互联网公司招聘云容器GO研发技术Lead,希望可以带领团队负责新的一代产品的研发,GO作为主要的技术语言,业务连年增长,薪资很有竞争力,有兴趣的朋友可以加我微信:1861392,详细沟通,谢谢! -- 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-n

Re: [go-nuts] Re: fatal error: 'config.h' file not found

2019-04-17 Thread Nitish Saboo
Hi Ian, Made recommended changes to the file main.go.You can see the file in my repository : https://github.com/nitishsaboo/Testing Now 'go build -x' is failing with the following error: WORK=/tmp/go-build838755651 mkdir -p $WORK/b001/ cd /home/nitish/Documents/goworkspace/src/forgithub CGO_LDFLA

Re: [go-nuts] SHA256 with input not aligned to x8 bit

2019-04-17 Thread roger peppe
Personally I don't think so. It's a very niche use case AFAICS and I can't find an implementation in any other language that allows you to calculate the hash of an arbitrary number of bits. But this is just my point of view - anyone is free to raise an issue if they like. On Tue, 16 Apr 2019, 20:3

Re: [go-nuts] Current Thinking on Explicit Memory Freeing?

2019-04-17 Thread Michael Jones
There are two issues here: 1. *"I'm done with this and I want to free it now."* It seems helpful as a programmer to say such things. I wanted that once. The problem with it is that the runtime can't trust you if you say it. At best it can put the address on a list to be examined, but only a GC pas

[go-nuts] Is it possible to lazy duplicate the underlying bytes for coversion []byte(aString) on demand at runtime?

2019-04-17 Thread T L
The cap of the result slice of []byte(aString) is set to -realCap initially. An negative cap indicates the elements of the slice shouldn't be modified. When a modification operation on the result slice is encountered later, a duplication is performed and the cap of the slice is set to realCap. --