这个问题有意思。
package main
import (
"fmt"
)
func main() {
out := []byte{1, 2, 3, 4}
fmt.Println(out)
proc(&out)
fmt.Println(out)
proc2(out)
fmt.Println(out)
}
func proc(p *[]byte) {
*p = []byte{5,6,7,8}
}
func proc2(p []byte) {
p[0] = 5
p[1] = 6
p[2]
On Friday, January 5, 2018 at 10:51:09 PM UTC+2, Jason Lee wrote:
>
> I've set up a GoLang post request handler that uploads a file to Google
> Cloud Storage.
>
> Now I'd like to figure out how I can send the upload progress info back to
> the client before the whole thing finishes.
>
If the cli
On Fri, Jan 5, 2018 at 7:53 PM, Tong Sun wrote:
> That's OK Dave. It's over.
>
> All that I wanted is to confirm is that the usage of `tr.Td[1])` was
> right. Had I had that faith, there wouldn't have been this email, which
> apparently I was focusing on `tr.Td[1])` instead of what I should
> be
That's OK Dave. It's over.
All that I wanted is to confirm is that the usage of `tr.Td[1])` was right.
Had I had that faith, there wouldn't have been this email, which apparently
I was focusing on `tr.Td[1])` instead of what I should be focusing.
I.e., the answer I was expecting was just merely,
From
https://www.pharmamanufacturing.com/experts/contract-manufacturing-management-supply-chain-management-/show/71/
In the US: Food and Drug Administration Safety and Innovation Act (FDASIA),
Drug Supply Chain Security Act (DSCSA)
Don mentions the term "end-to-end security program".
Here's a
The best way to get help for this is to show us precisely what you
did, ideally in a small complete, stand-alone, example, and tell us
what you expected to happen, and tell us precisely what happened
instead.
--
You received this message because you are subscribed to the Google Groups
"golan
Using a channel read in the http handler will block the ticker for loop
until the read occurs, but if you want that then pass mc into the generic
function: https://play.golang.org/p/GrHQxPhy1qu
Using a buffered channel will keep the history of ticks and not block but
may run out of buffer space
Can you have the client make concurrent periodic get requests that return
the current status?
Alternatively websockets (https://github.com/gorilla/websocket) may work
depending on your deployment needs (Google App Engine doesn’t support them
yet and old web browsers don’t support them).
Matt
I've set up a GoLang post request handler that uploads a file to Google
Cloud Storage.
Now I'd like to figure out how I can send the upload progress info back to
the client before the whole thing finishes.
Through lots of searching, I've created a custom PassThru struct that
prints the progres
try using a global var.
something like https://play.golang.org/p/05-xBDh5rgn
On Thursday, 4 January 2018 15:09:41 UTC, Keith Brown wrote:
>
> I am trying to Serve a webpage while running a ticker in the background. I
> am trying to generate a random number, genRandom() , periodically and
> publi
On Fri, Jan 5, 2018 at 7:17 AM, wrote:
>
> I meet a strange problem when running a program on Linux. I get "fatal:
> morestack on g0" from stderr. The process is still there but does not
> respond anymore. When I use `curl
> http://ip:port/debug/pprof/goroutine?debug=1` to check the stack, but it
Why not use an interface?
type TableSaver func (db *DB)
or
type TableSaver func (tx *Tx) // depending on your needs
Allowing you to:
func (t *Table) SaveTable (...) {}
Which in your example if you wanted use a different SaveTable
implementation for OtherTable you could. Otherwise it would ju
Il giorno venerdì 5 gennaio 2018 16:57:04 UTC+1, Ayan George ha scritto:
>
>
>
> On 01/05/2018 10:16 AM, Manlio Perillo wrote:
> > Recently I have developed a few web applications in Go, using a
> > PostgreSQL database, but I have yet understand the best way to use
> > the database/sql package.
Here’s an overview of what I’ve done, but no quality claim is made.
In package main there’s a global:
type DB struct {
*sql.DB
}
var database DB
In func main() I call an initialization function that reads a JSON
configuration file and does sql.Open with dbname, user, password, host,
port,
Thanks, all!!!
Frank
On Friday, January 5, 2018 at 4:25:33 AM UTC-5, Ian Davis wrote:
>
> On Thu, 4 Jan 2018, at 6:55 PM, Frank Davidson wrote:
>
> Thanks!!! Very helpful blog post!!
>
> So, in proc, the slice header is copied, then an entirely new array is
> created - []byte{5,6,7,8} - and the
On 01/05/2018 10:16 AM, Manlio Perillo wrote:
> Recently I have developed a few web applications in Go, using a
> PostgreSQL database, but I have yet understand the best way to use
> the database/sql package.
>
I don't know how you're serving web pages but I typically use net/http.
This also m
Hello everyone,
I meet a strange problem when running a program on Linux. I get "fatal:
morestack on g0" from stderr. The process is still there but does not
respond anymore. When I use `curl
http://ip:port/debug/pprof/goroutine?debug=1` to check the stack, but it
halts. There is nothing usefu
Recently I have developed a few web applications in Go, using a PostgreSQL
database, but I have yet understand the best way to use the database/sql
package.
The simplest method seems to start a transaction in the HTTP handler and
pass a *sql.Tx value to all the functions that need to access the
Hi, my name is Alex Pliutau,
and I started my very first Youtube channel about Programming in Go
- https://www.youtube.com/channel/UCI39wKG8GQnuzFPN5SM55qw
I write mostly Go these days. And I love to share what I’m doing. If you
have something to ask, do not hesitate to send me a message.
Curr
Problem is else where, not the tr.Td[*1*]) usage.
On Thu, Jan 4, 2018 at 6:16 PM, Tong Sun wrote:
> Sorry, it must be the end of the day and my mind is no longer working...
>
> So I have a type
>
> type Tr struct {
> Td []*Td`xml:"http://www.w3.org/1999/xhtml td,omitempty"
> json:"td,om
Thanks to everyone who shared their experiences!
On Fri, Jan 5, 2018 at 3:14 AM, Simon Ritchie
wrote:
> I’ve used the Selenium Firefox plugin to test web servers written in Go.
> It’s great for end to end testing of a web server because it doesn’t know
> or care what the server is written in. I
https://www.debian.org/security/2018/dsa-4078
2018-01-05 6:49 GMT-04:00 Wojciech S. Czarnecki :
> On Thu, 4 Jan 2018 19:35:59 -0800 (PST)
> "'Eric Johnson' via golang-nuts" wrote:
>
>> Anyone have any insight into whether it is possible to launch a Meltdown or
>> Spectre attack using Go code?
>
>
On Thu, 4 Jan 2018 19:35:59 -0800 (PST)
"'Eric Johnson' via golang-nuts" wrote:
> Anyone have any insight into whether it is possible to launch a Meltdown or
> Spectre attack using Go code?
It is *not relevant* what language was used to prepare exploit. It
always melts down to the machine code
On Thu, 4 Jan 2018, at 6:55 PM, Frank Davidson wrote:
> Thanks!!! Very helpful blog post!!
>
> So, in proc, the slice header is copied, then an entirely new array is
> created - []byte{5,6,7,8} - and the slice header copy is set to point
> at that new array, and then discarded, whereas in proc 2,
I’ve used the Selenium Firefox plugin to test web servers written in Go. It’s
great for end to end testing of a web server because it doesn’t know or care
what the server is written in. It’s only concerned with the resulting HTML.
I recorded some web sessions using the plugin and can then play
25 matches
Mail list logo