[go-nuts] Re: I'm writing my website in golang but there is issue called 404 page not found

2020-03-08 Thread leszek . kubik
Hello,

It would be much clearer if you posted a complete sample of a Go code. 
Which framework are you using for the server? I guess it could be something 
with the server config, can it accept POST methods? Did you test the server 
first, independently of your frontend, by using curl or PostMan? It could 
be a problem with preflight request from the browser. 

The screenshot of the console is too small to read. 

/Leszek

On Sunday, March 8, 2020 at 4:19:20 PM UTC+1, Ali Hassan wrote:
>
> [image: goSnippet.JPG][image: firefox.JPG]
>
> [image: xhrSnippet.JPG]
> [image: htmlSnippnet.JPG]Browser Error 404   please help me resolve this 
> error. I think this is because of html page but when try this 
> /register.html then whole page display on my console. I will exchange my 
> data 
>
>
> [image: buttonSnippnet.JPG]
>

-- 
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/7dc12419-8f9c-43ea-8acb-0f8109fcac8b%40googlegroups.com.


Re: [go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-08 Thread Xiangdong JI
Thanks Robert, I'm trying to utilize the tool now, the new output rendered 
by goanalyzer contains a page for PC:0 goroutines, which were discussed in 
#29103 , but seems no further 
details are available, are they considered irrelevant to perf. analysis? 

On Thursday, March 5, 2020 at 8:09:18 PM UTC+8, Robert Engels wrote:
>
> You might be interested in github.com/robaho/go-analyzer which I believe 
> significantly improves the profiling information when dealing with highly 
> concurrent Go programs. 
>
> On Mar 5, 2020, at 12:13 AM, Xiangdong JI > 
> wrote:
>
> 
> Thanks Ian.
>
> I'm using schedtrace and scheddetail to help understand the scheduling 
> flow, the minimum monitoring window seems to be 1ms only, possible to get 
> more detailed info?
> Furthermore, sched* outputs extensive logs but what I expect, at present, 
> might be something like when a goroutine is parked due to what reason, 
> etc., can I get it with the existing diagnostics?  
>  
>
> On Thursday, March 5, 2020 at 11:24:23 AM UTC+8, Ian Lance Taylor wrote:
>>
>> On Wed, Mar 4, 2020 at 6:44 PM Xiangdong JI  wrote: 
>> > 
>> > Given the attached screenshot of pprof output, I wonder how to figure 
>> out the callers of 'runtime.mcall' and their cost? Thanks. 
>>
>> You can't, but it doesn't matter.  The mcall function is used when a 
>> thread changes from executing one goroutine to a different goroutine. 
>> Knowing the code that triggers the call into mcall won't tell you 
>> anything.  It's just where that goroutine happened to be preempted. 
>>
>> 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 golan...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/71ecd07a-0b42-4eba-9b22-5c7cc9821243%40googlegroups.com
>  
> 
> .
>
>

-- 
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/5b1f728e-68c5-407e-98c6-5e366fc28e53%40googlegroups.com.


[go-nuts] Re: I'm writing my website in golang but there is issue called 404 page not found

2020-03-08 Thread Brian Candler
Well, I can't see your problem immediately, but you've not made it easy for 
anyone to help you.

Am I going to retype your screen images to replicate the problem? No.  Am I 
going to write a main() function which wraps your code, and then work out 
what all the import statements need to be to make it complete? No.

Therefore, I suggest the best way to get help is to produce a standalone 
application which replicates the problem, and submit it in *text* format, 
so it's something we can simply copy-paste into a terminal, run and debug.

It doesn't need the HTML or Javascript parts - it's fine to use 'curl -X 
POST ...' to send a message to it.

Regards,

Brian.

-- 
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/b0578bee-1c38-4f88-bea1-6e672fddc089%40googlegroups.com.


Re: [go-nuts] Re: Changing source code in order code to be supported from older Golang versions e.g. Go 1.10

2020-03-08 Thread Jesper Louis Andersen
On Sun, Mar 8, 2020 at 9:31 AM Amnon Baron Cohen  wrote:

>
> There are many ways could try to "help" Dimitrios find ways to run modern
> Go code on XP, and help him
> extend the lifetime of his fleet of XP machines. But this would keep his
> organisation vulnerable to the next
> WannaCry attack. So I would suggest the most useful response is "don't do
> it".
>
>
The key point here is risk assessment. Your points are what should be
factored into such a decision. Personally, I would seek to upgrade out of
such old software, and I think it is somewhat healthy that we eventually
make operating vulnerable systems cost-ineffective. But you also have to
factor in a lot of other considerations. Some people are somewhat forced to
live with the risk of a software vulnerability because there are other
parts of the infrastructure you cannot upgrade. So you do your best to wall
off the rest of the world and keep using the old system. It isn't
ideologically sound. It isn't a good viable long-term solution. But at
times, the survival of a company requires you to gamble with the risk.

Another observation is that to upgrade out of old software, you need to
create an upgrade path that is viable. Since you are somewhat left behind,
there are reasons for building some stepping stones along the way, perhaps
not just tossing a hail-mary to the newest versions in the hope it fixes
everything. Exploring these options might make it easier to handle the
situation and slowly move away from a platform you don't want to be part of
anymore. You strike the system and listen for where there is a resonance,
you can use to lift yourself out of the misery.

-- 
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/CAGrdgiXbFOHkoQUQu%3Dp4RJN5afqO%2B_uMKrS6-BbPMGESgUCWNw%40mail.gmail.com.


[go-nuts] Re: Changing source code in order code to be supported from older Golang versions e.g. Go 1.10

2020-03-08 Thread Amnon Baron Cohen
Microsoft stopped supporting XP in 2006. This meant XP machines stopped 
getting security updates.
The following year the WannaCry trojan infected 200,000 XP computers 
globally, including 80,000 in Britain's
National Health Service (including some MRI machines). This caused a major 
crisis in hospitals, the cancellation
of all non-urgent procedures and the reversion to manual methods of 
administration. This attack cost the NHS
over £80 million. Nobody has ever estimated the impact on patient outcome.

There are many ways could try to "help" Dimitrios find ways to run modern 
Go code on XP, and help him 
extend the lifetime of his fleet of XP machines. But this would keep his 
organisation vulnerable to the next
WannaCry attack. So I would suggest the most useful response is "don't do 
it".

On Friday, 6 March 2020 19:11:44 UTC, Jake Montgomery wrote:
>
> On Friday, March 6, 2020 at 1:20:38 PM UTC-5, Amnon Baron Cohen wrote:
>>
>> Anyone who is able to put up with a 20 year old OS
>> will be able to tolerate a 2 year old Go version...
>>
>
> Dimitrios' question is a perfectly legitimate one. Your response does 
> nothing to actually answer the question. It also comes across as a bit 
> snarky. Just a friendly reminder that the Go community strives to be 
> "friendly and welcoming" to all. https://golang.org/conduct is a 
> worthwhile read. 
>
>
>

-- 
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/f8b17c6b-55b4-4782-8b48-77855eea3e1f%40googlegroups.com.