Alternative or github.com/gogo/protobuf/parser package - go

I'm searching for a package to parse a protobuf file and then found this [1]:
github.com/gogo/protobuf/parser
However, when I tried to do go get github.com/gogo/protobuf/parser there was no such package. Anyone knows another alternative of this package?
[1] https://libraries.io/go/github.com%2Fgogo%2Fprotobuf%2Fparser

You are using unofficial and old documentation from Libraries.io.
Use official, up-to-date documentation, and follow the installation intructions.
Protocol Buffers for Go with Gadgets:
https://github.com/gogo/protobuf
Getting Started
Installation

you can use default protobuf - https://github.com/golang/protobuf if you have errors in your protobuffers it says you after generating
all you need about usage and installation you can read in readme https://github.com/golang/protobuf/blob/master/README.md

Related

PCL library setup using vcpkg seems to be missing include files (pcl/visualization in particular)

My goal is to visualize a point cloud using PCL. This is possible according to their official tutorial (link). In the tutorial there is an include path pointing to cloud_viewer.h file (located under visualization folder). After a vcpkg install using "vcpkg install pcl:x64-windows" I couldn’t find the visualization folder. After some research it I found out that "visualization" does not come with default PCL install, but it is an optional feature (link). Then I used the "vcpkg install pcl[vtk]:x64-windows --featurepackages" and I am still missing the needed folder. If anyone could point out to me where am I making a mistake I would appreciate it.
I got the same problem with you. It seems vcpkg is not a good choice for pcl library. Many people have the same problem with visualization module
Using vcpkg does not provide all files, includes and headers for pcl.
I had the same issue, and downloading pcl all in one solved it.
You can find it here for example: http://unanancyowen.com/en/pcl181/
Other thing that can help, is to use this command on vcpkg:
.\vcpkg install pcl:x64-windows-static

Terraform Provider-specify version of SDK to pull / Cannot use validation.StringInSlice type schema.SchemaValidateFunc as type SchemaValidateDiagFunc

Due to this problem it looks like for providers you have to get a current version of the SDK (2.4.4 at time of post). This post has a lot of info on how to import a specific version of a package but surely every single provider writer isn't manually pulling the most recent version of the SDK (or are they)?
I'm new to Go/Terraform so maybe I'm missing something obvious but the providers I've found (including the official example) have something like:
import(
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
The current version is not 2 - it is 2.4.4. Now I know those are local paths but what confuses me is when I run something like go get it goes and pulls those down for me. I tried doing:
"github.com/hashicorp/terraform-plugin-sdk/v2.4.4/helper/schema"
but go get very much doesn't like that. How is go get finding those package versions? Is there an import syntax that just gets me the latest build or allows me more granularity? I haven't found a good way to tell what version of the SDK I have after running go get but based on this error message:
it looks like I have 2.0 because that error is, as I understand it, fixed in newer versions of the SDK.
I figured it out. The behavior is controlled by the go.mod file.
In there you'll find:
require (
github.com/hashicorp/terraform-plugin-sdk v1.14.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.0.1
As mentioned by #JimB the v2 is the major version for the plugin. v2.0.1 are GitHub tags. Changing this to v2.4.4 obtains the desired behavior.

How can I import a library from github to GO playground?

Hi I want to import a 3rd party library to GO playground, I saw an answer for this question: https://stackoverflow.com/a/27813778/6638204 but it said that this can not be done, but the xiam/go-playground library on github states that it can do this. I tried using it but I did not understand what should I exactly do. I successfully installed the library and used it to run programs that do not need third party libraries. but I did not get how can I import a third party library. ps: I have docker installed in my machine
The answer is still the same: you can't do that on the "official" Go Playground (at https://play.golang.org/).
If you or someone else runs a custom, modified version of the Go Playground: then the answer is you can do there whatever is allowed, which may include the usage of external libraries which the custom engine may go get prior to compilation and execution.
Also see related question: Which packages may be imported in the go playground?
You might be able to do it since May 14th, 2019
See this tweet (from Brad Fitzpatrick)!
The #golang playground now supports third-party imports, pulling them in via https://proxy.golang.org/
Example: https://play.golang.org/p/eqEo7mqdS9l 🎉
Multi-file support & few other things up next.
Report bugs at golang/go issue 31944, or here on the tweeters.
But that means you have published your package deliverable in such a way it is reference by the Go proxy.

Install exp/html in Go

It looks like Go doesn't support HTML web parsing tools/packages yet, despite it already providing XML scraping via encoding/xml. So how can I install exp/html package in Go?
As far as I know, all the answers, at least I stumbled upon on the Web with 10 minutes worth of searching, didn't return the correct answer; when I tried to run those, I got the error cannot find package XXX in YYY or no Go source files in XXX.
So as of now, can I install it without re-compling and setting the whole Go environment from scratch? Or am I missing something?
I'm on OS X 10.8 and run Go version 1.1, which I installed from OS X package installer.
For your information, these code didn't make it.
go get code.google.com/p/go/src/pkg/exp/html
go get code.google.com/p/go.exp/inotify
Thanks.
I just tried:
go get code.google.com/p/go.net/html
and it seemed to work.
I have a feeling it's been moved from the exp library to the new net library.
EDIT: Documentation & browseable repo.
With go 1.4 (November 9th, 2014), you will have to type:
go get golang.org/x/net/html
See:
"New Import paths for Go sub-repositories".
"Go 1.4 subrepo renaming".

Freeradius with google protobuf

I want to use google protobuf with freeradius. The idea that Freeradius should able to encode/decode send/receive RADIUS message.
I found one link but doesn't know how to make or install it. As not much mentioned in README file.
https://github.com/rssh/rlm_protobuf/tree/freeradius-2.1.x
It required to run ./configure file to make MAKE file then package can be bulid and installed.

Resources