go-search.org and Google just found CVSS v2 implementations.
Anyone have any tips?
Eric.
--
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
On Monday, July 18, 2016 at 4:45:37 AM UTC-7, rog wrote:
>
> On 16 July 2016 at 16:33, Daniel Theophanes > wrote:
> > I would also note that AGPL is probably unusable in most Go programs
> > (statically linked and all). -Daniel
>
> Why so? You just need to make your
On Tuesday, February 7, 2017 at 3:12:13 PM UTC-8, Francis Chuang wrote:
>
> I am working on a client library that starts a Kafka consumer to listen
> for messages from a kafka stream and run some user defined handlers.* I
> want the design to be "crash-only" as much as possible*, so will be
>
On Sunday, August 21, 2016 at 3:04:02 PM UTC-7, Asit Dhal wrote:
>
> Hi all,
> I use defer to release resource at function level.
>
> func test() {
> a := A.Open()
> defer a.Close()
> //other code
> }
>
> I need the object a, to be wrapped in a struct. Can someone tell me how to
> make
Not that I think these account for much, but sort of fun to point at:
https://benchmarksgame.alioth.debian.org/u64q/go.html
(Short summary - now with Go 1.7, Go is faster for most benchmarks.)
And then, for language adoption, the TIOBE language index for August of
2016:
wrote:
> On Mon, Aug 29, 2016 at 4:51 PM, 'Eric Johnson' via golang-nuts
> <golang-nuts@googlegroups.com> wrote:
> >
> > And then, for language adoption, the TIOBE language index for August of
> > 2016:
> > http://www.tiobe.com/tiobe-index/
> >
>
On Thursday, September 29, 2016 at 1:12:41 AM UTC-7, dja...@gmail.com wrote:
>
> Hi,
> May be OT, but:
>
> Can i translate some GPLv2 licensed C code to GO, and publish it under
> BSD new license ?
> Code comments are from original C code.
>
The correct way to do this would be to perform a
Why not, instead of passing a file path as a parameter, pass a function that
returns a ReadCloser (and error, of course). That way, you can preserve the
existing semantics of your function, but move the decision of what to open, how
to open, and how to handle the error for when it fails - all
On Friday, November 4, 2016 at 2:32:24 PM UTC-7, Tong Sun wrote:
>
> How to beautify a given XML string in GO?
>
As someone who has spent a fair amount of time in the complexities of XML,
it is worth noting that XML is not equivalent to JSON in the context of
your question.
Only with a
On Saturday, September 24, 2011 at 9:14:22 AM UTC-7, nvcnvn wrote:
>
> I just read here:
> http://golang.org/doc/go_faq.html#Is_Go_an_object-oriented_language
> And all of the GO example we have is not writen in OOP way.
> So can I say that GO see the benefit of Procedural over OO!?
>
On Tuesday, October 11, 2016 at 5:55:23 AM UTC-7, Peter Vypov wrote:
>
> This question has been asked here a number of times, but the last time a
> few months ago: are there any plans to add support for package versioning
> (understanding VCS tags in the import paths), that is to teach `go get`
On 10/12/16 2:32 AM, Peter Vypov wrote:
On Wednesday, October 12, 2016 at 2:04:19 AM UTC+2, Eric Johnson wrote:
My view is that the general case requires putting such metadata in
a separate file for a package.
Yes, I agree with you that having multiple Go files with such comments
> On Jan 3, 2017, at 8:47 AM, Haddock wrote:
>
> I large organization where Java JEE architects are around bringing Go into
> the game is almost impossible. Many architects have build up their careers on
> application servers and EJBs without really understanding what that big
Stand-alone services are definitely the way to go. Pick a small service
that either is yet to be written, or is performing badly in its current
Java implementation.
Eric
On Dec 29, 2016, at 12:35 AM, Haddock wrote:
This thread is very interesting to me as I'm working
On Monday, December 19, 2016 at 5:03:43 AM UTC-8, Tieson Molly wrote:
>
> What arguments or factors have contributed to your company adopting Go?
>
My company does enough different kinds of work that the question is too
broad. To some, "adoption" might imply broad usage. In practice, usage
My 2 cents:
On Saturday, April 1, 2017 at 4:26:20 AM UTC-7, Axel Wagner wrote:
>
> Ian:
> Re your question: See my example given above (or the one below, which is
> probably more authentic). For example, you might be allocating the returned
> struct, and piece by piece filling in the fields. If
A question has been bugging me for the past few weeks. How can I tell what
was used to build a Go application?
As I see various security notices scrolling by my email inbox, I see things
like Tomcat or OpenSSL announcing security updates, the JRE, or for that
matter, Go itself.
Once I see
Structs give the caller so many immediate benefits:
- If there's internal state that clients shouldn't muck around with,
then (a) keep a field private, or (b) keep a field private and make it a
pointer to state (such as mutexes).
- Structs can be copied directly.
- Set and get
As I scan reports of vulnerable software, I'm concerned that it is
impossible to tell, from a Go binary, what was used to build that binary.
Which means that if I depend on some library that is discovered to have a
vulnerability, I cannot look at each of the binaries I have deployed, and
For the truly paranoid, perhaps write a helper function "EnsureClosed()" or
something like that, which will do the close, but perhaps also
appropriately log a failure to close.
On Wednesday, August 16, 2017 at 5:05:39 AM UTC-7, Gert wrote:
>
> To pass errcheck I need to do something like
>
>
On Sunday, July 9, 2017 at 9:12:06 PM UTC+2, Anmol Sethi wrote:
>
> Hello everyone!
>
> I’m writing a new library where I need to be able to configure a struct.
> This struct and its configuration will be accessed concurrently. One design
> pattern I see throughout the standard library and
Again, I'm mostly for generics being added to Go, because I've found
occasion where they would be useful...
On Thursday, July 20, 2017 at 6:40:00 AM UTC-7, M P r a d e s wrote:
>
> Go could have least have parametric functions (ex :
>
> func Foo(value T)T { /.../ }
>
> bar := Foo(3) //types are
On Saturday, September 21, 2013 at 7:04:09 AM UTC-7, Michael Daconta wrote:
>
> As you can see, the code has semi-colons in each required location. So, I
> ask you - why is the above code illegal?
>
Why is breaking the speed limit illegal? On many roads, it is set
arbitrarily low because
While I lean towards the view that Go should add support for type generics,
I'm not sure your example actually provides sufficient detail to be an
argument for them.
On Monday, July 17, 2017 at 2:07:46 AM UTC-7, mhh...@gmail.com wrote:
>
> in func do(i interface{}) interface{} (return i), do
2017 at 9:10 AM, Lars Seipel <lars.sei...@gmail.com> wrote:
> On Tue, Aug 15, 2017 at 04:58:00PM -0700, 'Eric Johnson' via golang-nuts
> wrote:
> > As I scan reports of vulnerable software, I'm concerned that it is
> > impossible to tell, from a Go binary, what was us
*may*
> have a Gopkg.lock (if everyone uses dep) but not much else. They may be
> Debian and build from source packages where the Go compiler sees no version
> info at all - but the package manager knows the information you want. Etc.
>
> //jb
>
> On 16 Aug 2017, at 20:11, 'Eric Jo
In this kind of scenario, I recommend a (type) wrapper for *File
Rework the code as:
type Doer *File
func NewDoer(f string) (Doer, err) {
file, err := os.Open(f)
// ...
}
func (d Doer) Close() error {
return d.Close()
}
Everything else being the same, your caller can then expect
My take is something like the following would be more idiomatic
// SummonerByName returns profile address and an error. We need it in case
where
// we cannot get the profile for some reason
func SummonerByName(name string, server string) (*SummonerProfile, error) {
var resp, err =
Indeed. This is the same answer I was going to give.
Run-time code generation implies a whole bunch of different scenarios with
a whole bunch of use-cases. There are resource sharing concerns, security
concerns, and performance concerns that need to be nailed down. Otherwise
it is difficult to
Just answered a question on Quora today that might be helpful:
https://www.quora.com/Why-would-anyone-program-in-Go/answer/Eric-Johnson-157?share=ca0e6b40=zEgo
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and
Hi Anirudh,
On Tuesday, May 22, 2018 at 4:29:59 PM UTC-7, Anirudh Vyas wrote:
>
> Hi -
>
> I want to have a Printfln on log and fmt - Currently I use fmt.Printf( "
> yada yada \n", some_yada_yada) to achieve same effect. Is there a plan to
> add this simple yet extremely useful function?
>
I
Anyone have any insight into whether it is possible to launch a Meltdown or
Spectre attack using Go code?
Go's general practice of preventing access beyond slice limits, and its
habit of zeroing memory makes me think triggering a Spectre or Meltdown
attack with Go code is very unlikely.
On
An interesting idea. Some thoughts
On Friday, February 2, 2018 at 9:03:54 AM UTC-8, matthe...@gmail.com wrote:
>
> I’m looking at patterns summarized on Wikipedia from “Design Patterns:
> Elements of Reusable Object-Oriented Software” and writing out a few as the
> equivalent in Go.
>
>
Two thoughts about the contracts proposal:
- In the proposal a contract is loosely defined as the resulting
implications from a function. In the interests of starting a discussion, it
seems like a great starting place. However, it feels like it would be
useful to spell it out in
I have a different perspective
On Thursday, April 5, 2018 at 10:26:19 AM UTC-7, bingj...@gmail.com wrote:
>
> Almost 10 years golang appears in the world. 10 years is not a short
> duration. I think if it is not popular until 2020, it will never be popular.
>
> Golang is designed for cloud and
Is an alternate solution to use Go as a source language, then translate to
an allegedly "ISO" language?
Eric.
On Thursday, October 11, 2018 at 8:57:39 PM UTC-7, Beoran wrote:
>
> So no matter if I say yes or no, both ways are bad? I think is not a very
> fair way to argue.
>
> Anyway, with the
; On Thu, 6 Dec 2018, 10:26 pm Eric Johnson
>>
>>
>> On Thu, Dec 6, 2018 at 12:16 AM roger peppe wrote:
>>
>>>
>>>
>>> On Wed, 5 Dec 2018 at 18:55, 'Eric Johnson' via golang-nuts <
>>> golang-nuts@googlegroups.com> wrote:
>>>
&
On Thu, Dec 6, 2018 at 12:16 AM roger peppe wrote:
>
>
> On Wed, 5 Dec 2018 at 18:55, 'Eric Johnson' via golang-nuts <
> golang-nuts@googlegroups.com> wrote:
>
>> I always go with the approach that uses the equivalent of the
>> "Transact()" method.
>
I always go with the approach that uses the equivalent of the "Transact()"
method.
On top of that, rather than use a generic *sql.Tx parameter to the "txFunc"
function, I pass an interface that is specific to the operations of the
database layer for my application.
This pattern has three
On Monday, September 17, 2018 at 9:04:26 AM UTC-7, jucie@zanthus.com.br
wrote:
>
> Go core team is working hard to bring generics to the language because
> several people asked for it. With all due respect for those users and for
> people working hard to make generics a reality, I feel
On Tue, Sep 18, 2018 at 6:21 AM Robert Engels wrote:
> I am going to refer everyone involved in this discussion on generics to
> this once again. I know it is long, read the summary... but it’s important:
>
>
> https://www.researchgate.net/publication/236644412_Adoption_and_Use_of_Java_Generics
It would be great to hear of an answer to this question. I suspect there
isn't one, though.
The trouble is, one of the first hurdles is to identify Go libraries that
have CVEs against them. It is very easy to find CVEs for the Go standard
library, but I cannot see any easy way to scan the
And then, it also occurs to me that perhaps I can answer my own question.
Taking advantage of three aspects of the ecosystem.
#1) Most open source Go libraries are on GitHub
#2) Many (most?) CVEs for open source projects will include a reference
back to the project, and these references can be
Tips:
- When ever you're wondering about a good library for , two good
places to start are https://go-search.org ,
and https://github.com/avelino/awesome-go.
- As an alternative to finding a Go implementation, reuse an existing
one (libxslt) by calling out to C code. It may
Thanks for the pointers.
I was hoping for an easier answer. Maybe will look into patching stdlib.
Eric.
On Sat, Feb 22, 2020 at 1:15 AM Brian Candler wrote:
> Looks like your thoughts are the right ones:
>
>
On Sunday, January 26, 2020 at 10:27:35 PM UTC-8, pentel...@gmail.com wrote:
>
>
> IMHO, golang didn't make a dent on key areas to become a language of
> choice like big data (analytics, complex event processing, etc.) and
> consequently, hot topics like artificial intelligence. Exactly areas
To make an attempt at articulating why the error handling in Go is valuable
as-is, I note the following points:
- It is explicit, not hidden
- The default idiom highlights "error checking being done here" (Go
developers learn to look for lines "if err != nil".)
- It is possible to
t concrete Go
> types are:
>
>- bool for JSON booleans,
>
>
>- float64 for JSON numbers,
>
>
>- string for JSON strings, and
>
>
>- nil for JSON null.
>
>
> Does this help?
>
> 'Eric Johnson' via golang-nuts >
> schrieb
If I've got a structure like this:
type jsonData struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
}
I can marshal / unmarshal JSON as:
{
"first_name": "first",
"last_name": "last"
}
What if my input JSON is this:
{
"first_name": "first",
Indeed. The strength of Go's interfaces is precisely that a library
provider does not need to create interfaces, unless they are critical to
the implementation of the library. You should create these types of
interfaces when you need them.
There's a subtle versioning problem here. If Go adds a
50 matches
Mail list logo