Hi,
I am not sure if the input syslog msg will come in rfc3164 or rfc5424
format.
1)What is the generic way to parse raw syslog messages in GO ?
2)Once the msg is parsed how can I find that the raw syslog msg was in
which format ? I mean was it in RFC3164 format or was it in RFC 5424 format
?
3)S
On Friday, April 26, 2019 at 9:12:06 AM UTC+3, Mike Schinkel wrote:
>
> On Thursday, April 25, 2019 at 10:20:54 AM UTC-4, Sam Whited wrote:
>>
>> On Wed, Apr 24, 2019, at 14:08, Mark Volkmann wrote:
>> > Are there really developers that find this unreadable?
>> >
>> > color := temperature > 80
Hi all,
We have an unusual issue owing somewhat to Jenkins' rather odd (but
understandable) method of running things in containers. Jenkins, when it runs
things in Docker containers through its pipeline plugin, volume-mounts the
workspace directory at the same location as it is in the host sys
On Thursday, April 25, 2019 at 10:20:54 AM UTC-4, Sam Whited wrote:
>
> On Wed, Apr 24, 2019, at 14:08, Mark Volkmann wrote:
> > Are there really developers that find this unreadable?
> >
> > color := temperature > 80 ? “red” : “green”
>
> Yes.
>
> What is "?"? If I've never seen that before I
Andrew Klager wrote:
>
> Is this so bad?
>
> func ternary(cond bool, pos, neg interface{}) interface{} {
> if cond {
> return pos
> } else {
> return neg
> }
> }
>
> color := ternary( temp < 80, "blue", "red" )
>
The issue with that proposal is both true and false expressions are always
e
Marcus Low wrote:
>
> datalen := removedKeyken // removedKeyken must have been int32 in your
> example.
> if value != nil {
>datalen = len(value)
> }
>
The issue with this is it makes two assignments when value != nil instead
of just one.
--
You received this message because you are subsc
On Thu, Apr 25, 2019 at 8:59 PM xu wrote:
> I recently built an app using go plugin, but I have some questions about
> "plugin cannot be closed", why can't plugin be uninstalled?
>
Try googling "go plugin unload". The first result for me is
https://github.com/golang/go/issues/20461 and there are
Use something more separated than a dll/so if it changes frequently.
For example github.com/hashicorp/go-plugin starts the given executable and
communicates with it through a domain socket.
That way you can easily restart the plugin as frequently as you wish.
--
You received this message because
Dear all:
I recently built an app using go plugin, but I have some questions about
"plugin cannot be closed", why can't plugin be uninstalled?
The application I build needs to load and unload the plugin frequently to
call the changed external logic (this part of the logic changes
frequently).
I disagree with the suggestion.
IF statement indicates a branching of execution path. It should be made to
stand out so that when people are skimming through the code can immediately
pick up these alternate execution paths. Changing it to a mere "?" will
reduce its visibility. You have to read
Please understand that my use of ?: in the proposed grammar is
irrelevant. Using the syntax proposed here leads to the same problem.
You have self contradictory claims below:
1. the change is only a swapping of 'if' => '?' and 'else' => ':' with
no semantic change: "My proposal regardin
The problem is that Go already has if and else and else if (which would look
really weird in your proposal)
Changing a word to a symbol does not enhance meaning - it reduces it, and
increases the learning curve.
Like I said, you will probably like Ada - lots of symbols there.
> On Apr 25,
I'm running into an issue with reverse bindings similar to this.
My project structure is like:
mobile/
└── pkg
└── example
├── android
│ └── javatest.go
└── testmobile.go
*testmobile.go:*
package example
import (
"mobile/pkg/example/android"
)
func SystemCurrentT
To Kortschak and all others participating in this debate :
Please don't get hung up over my choice of symbol '?' .
My choice of symbol '?' and ';' is causing people to equate my proposal
with a proposal to adopt C's ternary operator in Go. This is not what I
intended to propose.
My proposal r
Ok. I fixed it.
For anybody interested, here's how I solved it.
On the Go side, I extended my exported function by adding "ctx
content.Context" as a parameter (i e "func Hello(ctx content.Context).
On the Java side, I'm then passing the mobile context as follows (this is a
React Native app, so
>
> There are many counter-examples. What is the likelihood that someone who
> is not familiar with the "?" operator will be familiar with the operators
> for getting (*) and dereferencing (&) a pointer. And what is "<-"?
> Certainly people not familiar with Go will initially be confused by
> opera
The difference is that the ternary operator is an expression and the
if...else is a statement. If you're only suggesting a syntax change,
then the difference becomes one of readability.
I'll ask again, how would you preclude nesting without making the
language more complex?
On Thu, 2019-04-25 at
Rob:
Am I missing something ??
The proposed syntax
test ? {
} : {
}
with no-nesting allowed is equivalent to
if test {
//.
} else {
// ..
}
..The former is just a cleaner way of writing the latter
Any complaints regarding 'abuse' associated with the former equally apply
to the latte
Ahh, thanks all, awesome :)
On Thursday, April 25, 2019 at 12:35:16 PM UTC-7, Andrew Price wrote:
>
> Hey folks,
>
> A colleague wrote this:
>
> func (l *Logger) log2StdFormatted(level string, msgOrFormatOrArg
>> interface{}, args... interface{}) (formatted string) {
>
>
> Note the position of t
I'm a big fan of the ternary operator in general. Maybe this is because I'm
an old timey Lisper. A lot of the things people see as "abuse" or "too
complex" are equally problems with || and &&.
This is also true for Jan's point: that ?: affects control flow by omitting
execution sometimes. It would
You have three tokens in "args ... interface{}", (args) (...)
(interface{}), the spacing doesn't matter in this case. It's just like in
C, you can have int *foo or int* foo. Semantically, the two are the same.
-- Marcin
On Thu, Apr 25, 2019 at 12:35 PM Andrew Price wrote:
> Hey folks,
>
> A col
On Thu, Apr 25, 2019 at 1:35 PM Andrew Price wrote:
>
> Hey folks,
>
> A colleague wrote this:
>
>> func (l *Logger) log2StdFormatted(level string, msgOrFormatOrArg
>> interface{}, args... interface{}) (formatted string) {
>
>
> Note the position of the space *between* the ... and interface{}, no
"..." is called an ellipsis (plural ellipses).
The presence or absence of the space is unimportant; you're seeing the way
gofmt formats it, but the parser doesn't care. Since period is not a
legitimate constituent of an identifier name, they scan in separate tokens
either way.
On Thu, Apr 25, 20
Hey folks,
A colleague wrote this:
func (l *Logger) log2StdFormatted(level string, msgOrFormatOrArg
> interface{}, args... interface{}) (formatted string) {
Note the position of the space *between* the ... and interface{}, not
before the ...
[btw does "..." have an easy-to-search-for name?]
On Thu, Apr 25, 2019 at 8:58 PM wrote:
>
> Rob : how can it be abused if the compiler wont allow nested ? operators ??
Rather easily. Just by fuzzilly mixing the otherwise purposely
distinct syntax of expressions and control flow.
--
You received this message because you are subscribed to the G
Rob : how can it be abused if the compiler wont allow nested ? operators ??
On Thursday, April 25, 2019 at 11:47:21 AM UTC-4, Rob 'Commander' Pike
wrote:
>
> I am pretty sure that the decision not to have ?: in Go was a unanimous
> decision by Robert, Ken and myself after almost no discussion. I
On Thu, Apr 25, 2019 at 5:55 PM Ian Lance Taylor wrote:
> On Thu, Apr 25, 2019 at 8:29 AM JuciÊ Andrade wrote:
> >
> > These are the ones I am aware of:
> >
> > . GC toolchain
> > . GCC
> > . gopherjs
> >
> > By Go compiler I mean any tool that understands Go source files and
> generates executa
Apologies Jake.I am new to this forum.Will try to maintain the decorum from
next time.
Thanks,
Nitish
On Thu, Apr 25, 2019 at 10:34 PM wrote:
> This group works on a longer timeframe. It is not uncommon for it to take
> a day or two to get a good response. Bumping your post 8 hours later is
>
Apologies Jake.I am new to this forum.Will try to maintain the decorum from
next time.
Thanks,
Nitish
On Thu, Apr 25, 2019 at 10:35 PM Robert Engels
wrote:
> That package parses syslog msgs according to rfc3164 so if that works for
> you then use it.
>
> On Apr 25, 2019, at 11:55 AM, Nitish Sab
That package parses syslog msgs according to rfc3164 so if that works for you
then use it.
> On Apr 25, 2019, at 11:55 AM, Nitish Saboo wrote:
>
> Hi,
>
> Can someone please guide me on this ?
>
> Thanks
>
>> On Thu, Apr 25, 2019 at 2:27 PM Nitish Saboo
>> wrote:
>> Hi,
>>
>> I want to p
This group works on a longer timeframe. It is not uncommon for it to take a
day or two to get a good response. Bumping your post 8 hours later is
definitely considered bad etiquette here.
On Thursday, April 25, 2019 at 4:57:04 AM UTC-4, Nitish Saboo wrote:
>
> Hi,
>
> I want to parse raw syslog
Hi,
Can someone please guide me on this ?
Thanks
On Thu, Apr 25, 2019 at 2:27 PM Nitish Saboo
wrote:
> Hi,
>
> I want to parse raw syslog messages in GO.Similar to glossy npm, which is
> a very generic yet powerful library for parsing raw syslog messages, How
> can we parse raw syslog message
There are many counter-examples. What is the likelihood that someone who is
not familiar with the "?" operator will be familiar with the operators for
getting (*) and dereferencing (&) a pointer. And what is "<-"? Certainly
people not familiar with Go will initially be confused by operators related
On Thu, Apr 25, 2019 at 8:29 AM JuciÊ Andrade wrote:
>
> These are the ones I am aware of:
>
> . GC toolchain
> . GCC
> . gopherjs
>
> By Go compiler I mean any tool that understands Go source files and generates
> executable code.
There is also llgo (though I'm not sure if that one still works)
I am pretty sure that the decision not to have ?: in Go was a unanimous
decision by Robert, Ken and myself after almost no discussion. It is too
easy to abuse, as the FAQ states.
-rob
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscrib
These are the ones I am aware of:
. GC toolchain
. GCC
. gopherjs
By Go compiler I mean any tool that understands Go source files and
generates executable code.
Thanks
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
FYI I recently posted a proposal for some unambiguous syntax which would
give a lot of the value of ternary operators i.e. write the 5 line if-else
block in the FAQ as a 1-liner, without the drawbacks, while IMO preserving
the simplicity of the go language in approachability, readability and
or
On Thu, Apr 25, 2019 at 9:20 AM Sam Whited wrote:
> On Wed, Apr 24, 2019, at 14:08, Mark Volkmann wrote:
> > Are there really developers that find this unreadable?
> >
> > color := temperature > 80 ? “red” : “green”
>
> Yes.
>
> What is "?"? If I've never seen that before I have no easy way to se
On Wed, Apr 24, 2019, at 14:08, Mark Volkmann wrote:
> Are there really developers that find this unreadable?
>
> color := temperature > 80 ? “red” : “green”
Yes.
What is "?"? If I've never seen that before I have no easy way to search
for that, and a random symbol me nothing about what it does.
>
> > Is this so bad?
>
> Yes, it's horrible as you'll loose any type information you had.
> Meaning the next thing you naturally had to do was type cast it, which
> isn't the nicest syntax to begin with.
> By then it's probably more work than just using if / else
>
So what you're saying is that G
Go vet doesn’t report on structural issues - and those are far harder to work
with/debug than code with the proper use of ternary operators (or even poor use)
Bad code is bad code no matter how you get there.
On Apr 25, 2019, at 7:05 AM, Lucio wrote:
>>
>> But don't deny others the ability to
>
>
> But don't deny others the ability to choose the first alternative
>
That's not what's being denied: what is being denied, is the ability to
write nested ternaries I then have to debug. Fat lot of good it will do me,
that vet reports it to be a misuse.
Lucio.
--
You received this mes
Hi,
I want to parse raw syslog messages in GO.Similar to glossy npm, which is a
very generic yet powerful library for parsing raw syslog messages, How can
we parse raw syslog message in GO ?
Can I make use of this link
'https://github.com/nanobox-io/golang-syslogparser/blob/master/rfc3164/rfc
43 matches
Mail list logo