On Wed, 10 May 2017 10:05:56 -0700 (PDT)
Zachary Kaplan wrote:
> can somebody please explain to me when a function
> should to return a string as opposed to, say a []byte? thanks
>
Just a few examples.
Strings can be keys in map[string]something, []byte can't be a key due
to them are non compara
How to pass value in nested template if possible?
Template package has terse documentation and not much examples.
In brief I want to
if err := template.Must(template.New("").Parse(`{{ define "inner"
}}{{ . }}{{end}}{{ define "outer" }}{{ template
"inner"}}{{end}}`)).ExecuteTemplate(os.Stdout
Hi, David
thanks for the code,
slightly offtopic, seems you heavily use Acme which can explore 9p file
system directly without mounting, but I forget the syntax on plan9port
and can't find appropriate documentation. Can you kindly give me a hint.
Cheers
__
Ilya
On 02/24/2017 10:20 AM, David Ar
It's documented. From lang spec
https://golang.org/ref/spec#Function_declarations
"A function declaration may omit the body. Such a declaration
provides the signature for a function implemented outside Go,
such as an assembly routine."
On Thu, 9 Feb 2017 04:15:00 -0800
(PS
Synchronization with simplenote service https://simplenote.com/ may be
very appreciated. simplenote service has huge user base(me too) due to
perfect clients for android and OSX and easy sync via
simperium API https://simperium.com/. But linux client been made with
React app packaged in Electron is
On 02/08/2017 10:55 PM, Ron Evans wrote:
|
packagemain
import"fmt"
type tableServer struct{
table int
}
type TableServerinterface{
SetTable(table int)
GetTable()int
}
func NewTableServer()TableServer{
return&tableServer{}
}
func (i *tableServer)SetTable(table int){
i.table =table
}
Seems for me, you don't do any selection like in JS code, even any
polling. Sure it would perform better. (Maybe I'm missing something, not
so proficient in nodejs)
On 02/06/2017 08:56 AM, fwang2...@gmail.com wrote:
For compared with nodejs:
if I remove all the serverDone case, only left the t
You can use io.TeeReader to connect them all. Also to simultaneously
read from one file, encrypt, and write to another file on the fly you
seems to need a bit of concurrency
func (b2h *B2Handler) EncyptandUpload(iv []byte, fileName string,
outputFileName string) {
key := []byte("example key
Try to construct an io.Pipe maybe
pReader, pWriter := io.Pipe()
writer:= &cipher.StreamWriter{S: stream, W: pWriter}
UploadFile(outputFileName, metadata, pReader)
writer.Write(src)
On 02/02/2017 10:27 PM, Justin C wrote:
I have a encryption function that gives a cipher.StreamWrit
On 01/27/2017 05:20 PM, Ian Lance Taylor wrote:
Please file an issue at https://golang.org/issue/new. Thanks. Ian
Ian,
done, issued.
--
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 i
ooks like a bug, or documentation
incorrectness/incompleteness.
__
Ilya Kostarev
--
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...@goog
tions however `default` most likely be an
essence. CPU load is a cost of `select` which is quite expensive operation.
__
Ilya Kostarev
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving
are integer constants.
Manlio
Hi Manio.
Things are not so simple, say
const x, y = int 5, 3 / /explicitly
var f float32 = x / y
just doesn't compile with an error "cannot use x / y (type int) as
type float32 in assignment"
__
Ilya Kostarev
--
You receiv
package main
import "fmt"
func main() {
const x, y = 5, 3
var f float32 = x / y
fmt.Println(f)
}
output
1
https://play.golang.org/p/FH1f793gWI
How this doesn't produce 1.6
Would be thankful for explanation.
__
Ilya Kostarev
--
Yo
On 09/05/2016 12:14 AM, Jason E. Aten wrote:
Or perhaps it is because sync.WaitGroup and sync.Cond (condition
variables) exist. They
aren't select{}-friendly, but they usually do the job.
Yes they aren't select{}-friendly. sync.Cond for example looks like
right choice but just blocks.
--
nal = closed
//...
signal = blocked
Does it considered meaningful or/and at least safe?
--
Ilya Kostarev
--
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 ema
16 matches
Mail list logo