[go-nuts] Re: custom slog Handler which adds Attribute and WithGroup
As I got zero reply to that answer, let me rephrase it probably more easily: I would like to use slog, no other logging library I would like to have an entry called eventID which is at the root level and has a unique uuid for every log entry I would like to use a group for every application specific key-val pairs What I trired so far: - Use a Handler to add eventID : The key gets added to the logger yet at the group nesting level, not at the root level - Use a ReplaceAttr-Function: I add the key on initiailisation yet leave the value unassigned to Replace it in the ReplaceAttr-Function: The ReplaceAttr-Function sees the root level addded eventID only untill a call to .WithGroup, then the eventId is no longer available within the ReplaceAttr-Function Any help? Johann Höchtl schrieb am Donnerstag, 5. Oktober 2023 um 17:59:30 UTC+2: > I created a custom slog Handler which adds an attribute eventId which is a > GUID > > A NewLogger function returns that logger wrapped into a group: Every > further key-value provided should go into that group. > > Unfortunately the eventId also gets promoted into that group although it > should be at the parent level. > > See here the Goplay https://play.golang.com/p/a10f09jMwL3 > > Thank you for your help, Johann > -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/16dc9f51-6c8c-4fd9-9942-5e365399e26dn%40googlegroups.com.
[go-nuts] custom slog Handler which adds Attribute and WithGroup
I created a custom slog Handler which adds an attribute eventId which is a GUID A NewLogger function returns that logger wrapped into a group: Every further key-value provided should go into that group. Unfortunately the eventId also gets promoted into that group although it should be at the parent level. See here the Goplay https://play.golang.com/p/a10f09jMwL3 Thank you for your help, Johann -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/ba1e69bf-b432-4703-8f5a-8e998fa06953n%40googlegroups.com.
[go-nuts] go get with Azure Devops on premise?
Hi, we are using Azure Devops server Version Azure DevOps Server 2020 Update 1.1 on premise. The server is not accessible from the internet. The web server uses integrated authentication for access. Browsing a git repository from a web browser looks like this: https://servername.yada.yada/tfs/CompanyCollection/_git/aconcreteProject I can successfully use git with ssh enabled. For the above aconcreteProject git remote -v says: origin ssh://servername.yada.yada:22/tfs/CompanyCollection/aconcreteProject/_git/ aconcreteProject (fetch) push and fetch work without issues. When I run go install servername.yada.yada/tfs/CompanyCollection/_git/aconcreteProject@latest it responds with go: servername.yada.yada/tfs/CompanyCollection/_git/aconcreteProject@latest: unrecognized import path " servername.yada.yada/tfs/CompanyCollection/_git/aconcreteProject ": reading https://servername.yada.yada/tfs/CompanyCollection/_git/aconcreteProject?go-get=1: 401 Unauthorized I have not yet setup environment variable GOPRIVATE I have not yet setup insteadOf in .gitignore (to actually use ssh instead of https) Will I be able to use Devops Server 2020 Update 1.1 to go get / go install packages? What do I have to set GOPRIVATE to, if my intention is to finally arrive at an import prefix of servername.yada.yada//tfs/CompanyCollection/aconcreteProject (do I have to hint go get to use git and append .git?) Thanks! -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAH4isRwzKhBHiwCA965TdcgzfQDgkp%2BEc5RpANiwQdk4OiR5EA%40mail.gmail.com.
Re: [go-nuts] Go2 Playground and constraints package
Thanks for pointing me to the tip-playground. And I like all being discussed in https://github.com/golang/go/issues/48424 Am Di., 16. Nov. 2021 um 08:57 Uhr schrieb Axel Wagner < axel.wagner...@googlemail.com>: > The go2go playground is basically obsolete, as it is based on the > prototype implementation, instead of gotip. > You can use https://gotipplay.golang.org/ which provides a playground > based on gotip. Though the example does not work there either, as > `constraints.Chan` has been removed after > https://github.com/golang/go/issues/48424. > > On Tue, Nov 16, 2021 at 8:51 AM Johann Höchtl > wrote: > >> The example from >> >> https://github.com/mattn/go-generics-example/blob/main/constraints-chan/main.go >> >> does not work with the Go2 Playground >> https://go2goplay.golang.org/p/Is-IieENirk >> as the constraints package is not available. I didn't find any mention on >> that on the Internets, is this a known limitation of the Go2 playground? >> >> Thanks! >> >> -- >> 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.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/12115415-4adc-4434-84f5-bf228ad7f5a7n%40googlegroups.com >> <https://groups.google.com/d/msgid/golang-nuts/12115415-4adc-4434-84f5-bf228ad7f5a7n%40googlegroups.com?utm_medium=email_source=footer> >> . >> > -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAH4isRwTNV6mHgUEzL%3DcWwhgWX26698pMOO91dGBq1a_93hS1w%40mail.gmail.com.
[go-nuts] Go2 Playground and constraints package
The example from https://github.com/mattn/go-generics-example/blob/main/constraints-chan/main.go does not work with the Go2 Playground https://go2goplay.golang.org/p/Is-IieENirk as the constraints package is not available. I didn't find any mention on that on the Internets, is this a known limitation of the Go2 playground? Thanks! -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/12115415-4adc-4434-84f5-bf228ad7f5a7n%40googlegroups.com.
[go-nuts] Re: Generics and parentheses
watso...@gmail.com schrieb am Mittwoch, 15. Juli 2020 um 04:44:53 UTC+2: > Guillamets are worth consideration. They are common on European keyboards > and avoid all the syntax ambiguities. > > > They are common in the french-speaking part of europe. Even the OPs statement > A typical computer keyboard provides four easily accessible pairs of single-character symmetrical "brackets": is wrong for the german keyboard layout. Now guillamets? I like the clarity of Golang and would not like to see it morph into APL. -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/50d4eef7-263f-4144-ab1f-797a40104397n%40googlegroups.com.
Re: [go-nuts] Modules... why it has to be so painfull?
This sounds like it would warrant a howto go modules blog post. Thank you for sharing your experience. michael...@gmail.com schrieb am Samstag, 10. April 2021 um 02:20:54 UTC+2: > FWIW, I completely agree with the sentiment that confusing documentation > has created pain and unnecessary difficulty for solo developers. I try to > keep in mind that Go was developed for use by large teams working on > million line programs and that I'm lucky to be able to piggyback on the > efforts of top-notch talent. > > That being said, here is a recipe that seems to work -- for my purposes at > least. It's really just a restatement of what others have said in this and > related threads: > > 1. Create a directory that will hold your local projects. I think it best > not to use ~/go/src. My directory is ~/localgo, I'll use that name in > in what follows, though there's nothing special about it. > 2. Undefine GOPATH, e.g. unset GOPATH > 3. Initialize a module named for the directory, i.e. cd ~/localgo; go > mod init localgo > 4. Move your package and cmd project underneath ~/localgo. > 5. When importing local package named "somepkg" use import localgo/somepkg > 6. If a package in your local directory is something you've published, you > have three choices when importing it: > >- Import it from your published repository, >- Import from your published repository and use "replace" to force the >import to use the localgo copy, >- Import directly from localgo (as in item 5). > > To make this a little more concrete here's a portion of my localgo tree > with two packages and two command projects. Notice that mypkg and myprog > do not have go.mod files yet myprog is able to import mypkg and build > without error. Package tbchrom, on the other hand, is already > (privately) published and versioned on GitHub. It's still under > development. Having it cloned under localgo allows me to reference it > from command tbflash which is not yet published. I'm using the replace > statement in tbflash's go.mod file, i.e., replace > github.com/Michael-F-Ellis/tbchrom v1.0.0 => /Users/mellis/localgo/tbchrom > > localgo > ├── go.mod > ├── mypkg > │ └── pkg.go > ├── myprog > │ └── main.go > ├── tbchrom > │ ├── .git > │ ├── .gitignore > │ ├── .vscode > │ ├── go.mod > │ ├── go.sum > │ ├── parser.go > │ ├── parser_test.go > │ ├── rhythm.go > │ ├── rhythm_test.go > │ ├── smf.go > │ └── smf_test.go > └── tbflash > ├── go.mod > ├── go.sum > ├── main.go > ├── main_test.go > └── tbflash.json > > I like this solution because it's consistent and flexible. It's consistent > in that all the go toolchain commands, vet, build, ... etc., work the same > regardless of whether a package or command if version controlled or has a > go.mod file. It's flexible, in large part, because it's consistent. I can > start a project with bare Go code and add module support and version > control as needed. > > Hope someone finds it useful. If you know of any awful pitfalls, please > let me know. > > On Friday, April 9, 2021 at 5:34:37 PM UTC-4 ohir wrote: > >> Dnia 2021-04-07, o godz. 14:31:07 >> Slawomir Pryczek napisał(a): >> >> > Anyone has an idea for a reasonable solution which will allow easy >> > refactoring and code organization in packages, in this new model? >> >> Idea is here: https://github.com/golang/go/issues/44347 >> >> Whether is it reasonable or not — objectively — I can not tell as I am an >> author. >> Though I'd like to see other's opinion whether proposed solution would >> work for them. >> >> TC. >> >> -- >> Wojciech S. Czarnecki >> << ^oo^ >> OHIR-RIPE >> > -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/4df0c9e7-a094-492e-843b-7ef7472db599n%40googlegroups.com.
[go-nuts] Re: gopls reports "Error loading workspace folders" for every project I have
Anybody running into this issue? Is this triggered from gopls and under what circumstances? Where can I get more help if this is a gopls issue? Johann Höchtl schrieb am Dienstag, 17. November 2020 um 11:29:51 UTC+1: > > I updated to gopls version golang.org/x/tools/gopls v0.5.3 > golang.org/x/tools/go...@v0.5.3 > <http://golang.org/x/tools/gopls@v0.5.3> > h1:C8QSrqjqaVzlVoHL1R9yWbROoOApRgI8gN1G+cHlPuw= > > Since then my vim-go plugin but also if I disable vim-go and use vims > native lsp-configuration reports > > > Error loading workspace folders (expected 1, got 0) > failed to load view for file:///home/john/src/gocode/src/ > github.com/the42/woctoa > pi: failed to get workspace configuration from client > (file:///home/john/src/goc > ode/src/github.com/the42/woctoapi): MethodNotFound > > I get this for module-enabled projects and those without a go.mod file. > > All my projects are within GOPATH though. > > What's the issue? > -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8954b036-1331-4165-bfc8-276aff3157een%40googlegroups.com.
[go-nuts] gopls reports "Error loading workspace folders" for every project I have
I updated to gopls version golang.org/x/tools/gopls v0.5.3 golang.org/x/tools/gopls@v0.5.3 h1:C8QSrqjqaVzlVoHL1R9yWbROoOApRgI8gN1G+cHlPuw= Since then my vim-go plugin but also if I disable vim-go and use vims native lsp-configuration reports Error loading workspace folders (expected 1, got 0) failed to load view for file:///home/john/src/gocode/src/github.com/the42/woctoa pi: failed to get workspace configuration from client (file:///home/john/src/goc ode/src/github.com/the42/woctoapi): MethodNotFound I get this for module-enabled projects and those without a go.mod file. All my projects are within GOPATH though. What's the issue? -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/dd81970c-aa9f-4edf-81c4-538a8e6b1d39n%40googlegroups.com.
Re: [go-nuts] Workflow and tools for JSON Schema generation
mar...@gmail.com schrieb am Freitag, 4. September 2020 um 20:13:42 UTC+2: > Oh wow, my email client showed your email in a truncated way, so i didn't > see you were already using my project, sorry for the silly response. > > It would be possible to add external type definitions to oapi-codegen, I > believe. I'm in the process of thinking about a v2 version which is more > stable, and less convoluted. V1 was a learning experience. > You project is awesome, I already use it! My current workflow is as following: 1. I create my models in code. Thereby I embed structs of external packages. 2. As I am lazy and do not feel like re-creating all the OpenApi3 model definitions declaratively is use go-swagger, only using model annotations like // swagger:model and exporting the models only 3. As go swagger is stuck in OpenApi 2.0 I use a sed - script to update the created YAML-models by go-swagger and fix the $refs to create a crippled yet valid OpenApi3 - spec 4. I define my API using an OpenApi3 - editor. Currently I am using editor.swagger.io as it doesn't mess with external refs to models 5. I scaffold my go app using oapi-codegen and the newly added -import-mapping, treating my own model as an external ref (which it somehow is, as I am embedding external struct members) Ugly hack, mostly because of go-swagger stuck in OpenApi2, but a hack that works :) > > On Fri, Sep 4, 2020 at 10:56 AM Marcin Romaszewicz > wrote: > >> Have you considered reversing the workflow? You write the OpenAPI spec, >> and have a code generator produce the Schemas and server boilerplate? >> >> If that's ok, check out my project :) >> https://github.com/deepmap/oapi-codegen >> >> We successfully use it for many API's in production. >> >> -- Marcin >> >> >> On Thu, Sep 3, 2020 at 12:06 AM Johann Höchtl >> wrote: >> >>> >>> Hi, >>> I would like to accomplish the following: >>> >>> An existing golang package on github provides a struct definition I am >>> interested in to be used as part of a REST API interface I design >>> >>>1. I would like to automatically go generate json schema for this >>>struct >>>2. I would like to incorporate this generated schema into an OpenAPI >>>definition and generate go boilerplate for that >>> >>> >>> For step 2 I am using https://github.com/deepmap/oapi-codegen which >>> works great. It also supports $ref to external schemas. >>> >>> Still looking to accomplish step 1: I am searching for a tool which go >>> generates JSON schema from a golang source file or package. Any help? >>> >>> -- >>> 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...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/golang-nuts/f0e099de-7008-478d-ba92-f2febd0c40bdn%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/golang-nuts/f0e099de-7008-478d-ba92-f2febd0c40bdn%40googlegroups.com?utm_medium=email_source=footer> >>> . >>> >> -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/11ccd06c-9201-47bf-987d-6fe9584f495bn%40googlegroups.com.
[go-nuts] Workflow and tools for JSON Schema generation
Hi, I would like to accomplish the following: An existing golang package on github provides a struct definition I am interested in to be used as part of a REST API interface I design 1. I would like to automatically go generate json schema for this struct 2. I would like to incorporate this generated schema into an OpenAPI definition and generate go boilerplate for that For step 2 I am using https://github.com/deepmap/oapi-codegen which works great. It also supports $ref to external schemas. Still looking to accomplish step 1: I am searching for a tool which go generates JSON schema from a golang source file or package. Any help? -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f0e099de-7008-478d-ba92-f2febd0c40bdn%40googlegroups.com.
[go-nuts] Re: Internal Compiler error when building go1.15 using go1.14.4
sam.mo...@gmail.com schrieb am Freitag, 28. August 2020 um 09:23:47 UTC+2: > > > On Thursday, August 27, 2020 at 11:38:54 PM UTC-7, Johann Höchtl wrote: >> >> >> Since long I am keeping my go installation up to date by compiling from >> source. Today on my attempt to update from 1.14.4 to 1.15 I triggered this >> fatal: >> >> >> GOROOT_BOOTSTRAP=/home/john/opt/go.build/ ./make.bash >> Building Go cmd/dist using /home/john/opt/go.build/. (go1.14.4 >> linux/amd64) >> # runtime >> ../../go.build/src/runtime/os_linux.go:276:29: internal compiler error: >> 'getHugePageSize': not lowered: v68, SlicePtr PTR PTR >> >> Please file a bug report including a short program that triggers the >> error. >> https://golang.org/issue/new >> >> Before triggering that error I did a git fetch, git checkout go1.15 and >> then copied my go directory to go.build. I should have copied go to >> go.build before but my assumption is that the 1.15 sources and 1.14.4 >> binaries will do no harm to bootstrap. >> > > This is your issue. 1.15 runtime (included within 1.15 sources) will not > work with 1.14.4 binaries. > > Indeed, checking out go1.14.4 (the source code matching the binaries) resulted in successful bootstraping. Still uncertain if an internal compiler error is the correct way to handle this situation. > Regards, > -Sam. > -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/bc0a2e3c-d0ab-431d-8181-a5427bede255n%40googlegroups.com.
[go-nuts] Internal Compiler error when building go1.15 using go1.14.4
Since long I am keeping my go installation up to date by compiling from source. Today on my attempt to update from 1.14.4 to 1.15 I triggered this fatal: GOROOT_BOOTSTRAP=/home/john/opt/go.build/ ./make.bash Building Go cmd/dist using /home/john/opt/go.build/. (go1.14.4 linux/amd64) # runtime ../../go.build/src/runtime/os_linux.go:276:29: internal compiler error: 'getHugePageSize': not lowered: v68, SlicePtr PTR PTR Please file a bug report including a short program that triggers the error. https://golang.org/issue/new Before triggering that error I did a git fetch, git checkout go1.15 and then copied my go directory to go.build. I should have copied go to go.build before but my assumption is that the 1.15 sources and 1.14.4 binaries will do no harm to bootstrap. Is this a known error? I couldn't find a ticket for that searching the tracker with is:issue gethugepagesize Shall I report a new issue? Thank you, Johann -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/151d68e0-6d76-44eb-8f1a-01b12df99720n%40googlegroups.com.
Re: [go-nuts] Re: vim-go autocompletion / help for struct members / function parameters
Am Montag, 17. Februar 2020 10:22:23 UTC+1 schrieb Jan Mercl: > > On Sun, Feb 16, 2020 at 9:38 AM Johann Höchtl > wrote: > > > > Anybody? My question was not meant to criticize vim-go or gopls, if they > can't (yet) do what I want those tools to support me, but a honest > questions if I do not know how to use the tools. > > I no more use vim-go, I've switched from vim-go to govim months ago, > so the only thing I can say is that AFAICT, both cases work for me in > govim. Struct fields are shown using , function arguments > documentation is available in a popup that's activated on mouse > hovering over the function name. > I would give govim a try, as of now it's vim only and I look forward to neovims tree-sitter. But having gocode vim plugin is intriguing. -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c82c-7fe0-471e-9765-7e2936c8a3b1%40googlegroups.com.
[go-nuts] Re: vim-go autocompletion / help for struct members / function parameters
Anybody? My question was not meant to criticize vim-go or gopls, if they can't (yet) do what I want those tools to support me, but a honest questions if I do not know how to use the tools. -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1eae5f42-a094-437a-ad09-bf25ea726f0c%40googlegroups.com.
[go-nuts] vim-go autocompletion / help for struct members / function parameters
I have a question about vim-go. Sorry if this is the wrong place, but opening a github issue feels wrong for that. I use vim-go autocompletion (a lot) in companion with gopls. I invoke it manually with ^C^O (omnicomplete) which is tied to gopls. I am not using deoplete. However, what I miss is: I am in the middle of x:= mystruct{ // <--- what members does mystruct offer? ^X^O is not helpful. Find myself gd - ing to the definition OR myfunc( // <-- what parameters in what order does myfunc expect?. Find myself gd - ing to the definition Does vim-go / autocompletion / offer me help to quicker identify struct members or function parameters? Thank you! -- 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.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9bebe181-9bd9-41da-99de-14fe6092d1c0%40googlegroups.com.
[go-nuts] Re: Organizing code with vgo
As the question might have been to generic -- Suppose I have the following layout: package ( containing a go.mod file) \ command1\ main.go Should vgo be able to create a /vendor/ folder in a sub-directory of a module? When Dockerizing go packages which result in executable commands I think the approach of having mostly self-contained packages is worthwhile. Yet when I execute vgo vendor in this directory I get an error message (sorry, being detached from my dev environemnt now, can't reproduce the error message) -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Organizing code with vgo
When writing go code with one package and one command I would structure it like package.go ./cmd/command1/main.go With package.go being at the root of the workspace and ./cmd/command1/main.go naming an executable which primarily make use of the package. Now I _migh_ have vendored package.go without checking in /vendor/ but I almost ever vendored ./cmd/command/ even with checking in the vendor folder. In the past I also included a minimal Dockerfile in ./cmd/command1/ which did a `go install -v` and, as I checked ./cmd/command1/vendor/ into source control, was done even without internet connection. With vgo, where would I put the go.mod file? How would I maintain this mostly encapsulated approach for `go install -v` I am note against fetching from a repository / whatever service vgo will support to load dependencies- it's just what I preferred upto now. Just curious how this future workflow might look like or how others think about that. -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Vgo and reproducable builds
Right at the beginning of the first post about vgo it is stated: > Versioning will also let us ensure that a program builds exactly the same way > tomorrow as it does today. Even when there are newer versions of my > dependencies, the go command shouldn't start using them until asked. However I did not notice how to specify that a certain compilation unit (set of modules) requires a certain go version. Is this intentional, expected to come over time, to be added at a later point in time, to be solved somehow differently? -- 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.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: Go 1.10 is released
Am Montag, 19. Februar 2018 14:17:18 UTC+1 schrieb Michel Casabianca: > > Hi Gophers, > > I have updated my list of Go interfaces for this release : > http://sweetohm.net/article/go-interfaces.en.html > > Just came across this very helpful overview (and sorry for hi-jacking the thread). Can guru enlist all the interfaces available within a given scope? Enjoy! > > 2018-02-19 8:00 GMT+01:00 Henrik Johansson>: > >> Thx, >> >> Why I wondered was because to build script (a tiny settings file really) >> for Archlinux uses this flag to build it's Go packages. >> Is it available as a paranoia "i really need all the tests run"? Will it >> be removed later on? >> >> >> >> >> sön 18 feb. 2018 kl 23:04 skrev Ian Lance Taylor > >: >> >>> On Sun, Feb 18, 2018 at 11:22 AM, Henrik Johansson >> > wrote: >>> > The GOCACHE variable. What is it's effect when building Go itself? >>> > It doesn't disable test caching when using the resulting go tools >>> right? >>> >>> Right. >>> >>> Ian >>> >> -- >> 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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Michel Casabianca > -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] RDF "encoding"
I am relatively new to RDF. I plan to use https://github.com/knakk/rdf to serialize data I read from CSV Of course it fails to encode invalid IRIs like "example.com/A + B" where I read the information "A + B" from a CSV file. Is there a standard to perform IRIs encoding? Would URL-encoding the read part be acceptable and interoperable? -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Library for NLP: counting word syllables, words, sentences
Am Mittwoch, 16. November 2016 02:33:04 UTC+1 schrieb Daniel Whitenack: > > Hi Johann, > > Looks like there are a good number of packages listed here: > > https://github.com/gopherds/resources/blob/master/tooling/README.md#nlp > > In particular, it sounds like this one has some of what you need: > > https://github.com/advancedlogic/go-freeling > That one I identified too. It totally lacks documentation, but looks otherwise compeling. I settled on "github.com/blevesearch/segment" // Unicode Word segmentation "github.com/neurosnap/sentences" // Sentence segmentation "github.com/speedata/hyphenation" // hyphenation for now but a more integrated library like freeling would be nice to use, for sure. Johann > Daniel > > On Tuesday, November 15, 2016 at 4:16:27 AM UTC-5, Johann Höchtl wrote: >> >> Is there a pure Golang library to detect words / sentences / syllables? >> https://github.com/advancedlogic/go-freeling might be able to do that >> but has no API. >> > -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Library for NLP: counting word syllables, words, sentences
Is there a pure Golang library to detect words / sentences / syllables? https://github.com/advancedlogic/go-freeling might be able to do that but has no API. -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Pure golang library to encode N-Quads
Is there any? I found https://github.com/Callidon/joseki which doesn't seem to support N-Quads and https://github.com/knakk/rdf seems to be incapable to serialize N-Quads. -- 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.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Install vim-go as a pacakge in vim 8
Am Montag, 19. September 2016 13:51:17 UTC+2 schrieb Jan Mercl: > > On Sun, Sep 18, 2016 at 10:46 AM Johann Höchtl <johann@gmail.com > > wrote: > > > I thought Vim 8 packages are all automatic. vim-go commands like :help > vim-go or :GoUpdateBinaries do not work. > > Are you using the vim-8.0 branch? ( > https://github.com/fatih/vim-go/tree/vim-8.0) > > Wasn't, did it, and worked. After manually running :helpt ~/.vim/pack/plugins/start/vim-go/doc/ I now have vim-go help. Thanks! > -- > > -j > -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Install vim-go as a pacakge in vim 8
Guys, nobody using Vim 8 and the venerable go-vim plugin in Vim 8 as a package? Don't let me down on that! -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Install vim-go as a pacakge in vim 8
I installed vim 8 using this ppa ppa:jonathonf/vim (seen on http://tipsonubuntu.com/2016/09/13/vim-8-0-released-install-ubuntu-16-04/) I cloned vim-go according to https://github.com/fatih/vim-go#install (Vim packages, http://vimhelp.appspot.com/repeat.txt.html#packages) The install simply says: For other plugin managers add the appropriate lines and execute the plugin's install command I thought Vim 8 packages are all automatic. vim-go commands like :help vim-go or :GoUpdateBinaries do not work. How to install the package with Vim 8? -- 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.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Golang git library able to communicate with LFS?
Am Dienstag, 2. August 2016 11:59:26 UTC+2 schrieb Jakob Borg: > > The repo you linked to includes the official client code. That's > probably the best starting point. > > Which repo do you mean? https://github.com/git-lfs/lfs-test-server is a server library exposing LFS API endpoint, it's not a client library? 2016-08-02 11:42 GMT+02:00 Johann Höchtl <johann@gmail.com >: > > > Hi, > > > > Is there a golang library available which is able to access Git LFS > > https://github.com/git-lfs/lfs-test-server ? > > > > https://github.com/libgit2/git2go ? > > https://github.com/src-d/go-git ? > > > > Thank you, Johann > > > > -- > > 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...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. > -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] What dependency management tool do you use?
Instead of thanking all reporters individually I'll do it here. I didn't expect a clear winner but some of the rationales for prefering one dependency mgmt tool over the other became more clear to me. To sum it up: I'll stick with godeps. It seems it hits somewhere the sweetspot between following go's way to organize source code and provides a thin, meaningful utility layer above. I aknowledge again gb - an inredible effort and again the reasons drawn are understandable. But I am not adventurous enough and rather stick with the crowd. I feared that this delecate topic, comparable to browser wars, will start some heated discussions, that was not my intention. Thanks to the contributors to this discussion! -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] What dependency management tool do you use?
I use godep. There has been lots of rumour lately to use gb. What do others use? If there is a blog post available somewhere comparing the pros and cons, please provide one. I know https://github.com/golang/go/wiki/PackageManagementTools I also like the idea of manul to use git submodules https://github.com/kovetskiy/manul -- 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.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: Idiomatic way to signal error using websockets
Am Donnerstag, 7. Juli 2016 16:25:38 UTC+3 schrieb Bogdan Bursuc: > > The websocket protocol is a TCP socket in the end after you establish the > handshake, this means you will send raw data through it and you can make > the protocol and errors as you want. > There will be no status code anymore, because what you send through that > connection wont be http anymore. > > Thank you for your replies. Both helped me to better understand the concepts of websockets. On Thu, Jul 7, 2016 at 3:59 PM Viktor Kojouharov <vkojo...@gmail.com > > wrote: > >> You have to define your protocol that goes through the websocket. For >> example, the json-rpc protocol has a special error field when an error >> occurs. >> >> >> On Thursday, July 7, 2016 at 10:45:04 AM UTC+3, Johann Höchtl wrote: >>> >>> I am using the gorilla websocket implementation. I am also new to >>> websockets. >>> >>> When I want to signal an error on an http-connection I used http.Error >>> which allwed me to set an http status error code, sets mime type to >>> text/plain an writes an error message to the receiver. >>> >>> How am I supposed to signal error conditions when using websockets. i >>> guess one I upgraded the http connection to a web socket connection >>> http.Error is no longer the way to go. >>> >>> My first quick searches didn't reveal examples of error handling >>> (usinggorilla websocket library. >>> >>> Thank you,Johann >>> >>> -- >> 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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- > Thanks, > Bogdan I. Bursuc > -- 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.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Urlwatch
Am Donnerstag, 23. Juni 2016 17:04:54 UTC+2 schrieb Shawn Milochik: > > What do you need it to do, specifically? Doing an http.Get on a page and > storing and comparing the bytes or a hash is something you could write in > under a minute. Why not just do that? > Get notified when a change happens. Your approach would certainly work but it's super-naive. Perform a Head Lookup and check the Timestamp when the resurce was changed, ETags, etc. all come to my mind to checl before downloading the whle resource. Or being able to specify a nesting level upto which embeded resources will be fetched recursively to check for change etc. So I think somebody else spent more time to think about that. There are services in other languages of course but I was hoping for some sort of getable service in Golang / package. -- 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.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Urlwatch
Is there any app, library etc. available which will monitor changes to web resources and perform actions afterwards? Something like https://thp.io/2008/urlwatch/ I found https://github.com/dustin/urlwatch but it seems to be broken and not very involved. https://golanglibs.com/top?q=broken Thank you! -- 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.com. For more options, visit https://groups.google.com/d/optout.