running test, I exec like this.
```go test -v _test.go```
Thanks.
Harry
--
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...@g
I got it.
In my case, there was only Example func.
When adding something Testxxx func, it worked well.
2016年9月17日土曜日 6時52分30秒 UTC+9 James Bardin:
>
> This is fixed in master. In go1.7 the Examples and Benchmarks aren't run
> if there are no Test functions.
--
You received this message because
it, result
type change into []byte.
Why, result type changed???
Thank you.
Harry
--
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
I made a mistake.
Second query don't include placeholder.
sql := "SELECT field1, field2 FROM t_xxx"
rows1, err := ms.DB.Query(sql)
There is no error.
I'm asking why result type was changed/
2016年9月28日水曜日 19時30分23秒 UTC+9 ksug:
>
> Did you check your error after each call to Query()?
> Without
Thanks ksug.
These two SQL expect same result.
Field1's type on MySQL is int.
When returning value as string type, that value is same to int value after
asserted to int.
But it's troublesome to handle two different result by placeholder
added/not added.
2016年9月28日水曜日 21時23分52秒 UTC+9 ksug:
>
>
Thank you ksug,
Your indication makes sense.
I try to check more detail.
And I'll feedback.
2016年9月28日水曜日 22時58分24秒 UTC+9 ksug:
>
> I don't think placeholder vs no placeholder makes a difference. Here is
> an example where Scan() into the same table could return values of
> different types (usi
Thanks, Konstantin.
It would be nice idea,
I'll try to check it!
2016年9月28日水曜日 23時00分14秒 UTC+9 Konstantin Khomoutov:
>
> On Wed, 28 Sep 2016 06:30:05 -0700 (PDT)
> Harry > wrote:
>
> > > In a nutshell, Scan() internally performs several nested type
> > >
Hi guys,
I wonder that question.
Before execution, it's possible to get query by myself.
But I want to get executed query string actually.
Is there any way to manage that?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe f
Hi Dave,
Now, I'm developping cache system of query result to redis or another
key-value store.
Stored data are supposed that seriarized result of query using key
serialized query string exected actually.
Harry
2016年6月14日火曜日 10時23分25秒 UTC+9 Dave Cheney:
>
> If there was a way
Hi guys,
Let's say there is something big size string data.
To store that data, I want to convert or compress this string.
Though I've already tried compress/gzip package.
What else how can I do that? What is most effective in size?
Thanks.
Harry.
--
You received this message b
ewDecoder(&b)
err = d.Decode(tData)
if err != nil {
return err
}
return nil
}
And then, I prepared for test targeted type are struct, map, interface{}.
func TestSerializeStruct(t *testing.T) {
u := User{Id: 10, Name: "harry dayo"}
result, err := ToGOB64(u)
if err != nil
Thank Dave and Jan.
I understood completely.
I'd consider another solution to manage that next.
Thanks again.
Harry.
2016年6月21日火曜日 14時58分39秒 UTC+9 Dave Cheney:
>
> To serialise the keys and values of a map and code would have to iterate
> over it
>
> for k,v := range m
Hello, everyone.
As title, I'm trying the below.
func SomethingFunc() {
fmt.Printf("func is %s\n", funcName)
/* code */
}
I want to show func name when running each func.
If I could get func name automatically, same code can be used.
Thank you.
Harry.
--
You receiv
Thank you, Alex!!
That'd be nice for me!!
Harry.
2016年7月13日水曜日 20時51分08秒 UTC+9 Axel Wagner:
>
> https://godoc.org/runtime#Caller
> https://godoc.org/runtime#FuncForPC
>
> On Wed, Jul 13, 2016 at 1:48 PM, Harry >
> wrote:
>
>> Hello, everyone.
>>
>
Thank you, Jan.
It can be helpful!!
Harry.
2016年7月13日水曜日 21時03分48秒 UTC+9 Jan Mercl:
>
>
> On Wed, Jul 13, 2016 at 1:48 PM Harry >
> wrote:
>
> > If I could get func name automatically, same code can be used.
>
> https://play.golang.org/p/XjDcnK78xY
>
>
I want to keep something records as log and where it is to specify.
2016年7月13日水曜日 21時28分52秒 UTC+9 Konstantin Khomoutov:
>
> On Wed, 13 Jul 2016 04:48:18 -0700 (PDT)
> Harry > wrote:
>
> > func SomethingFunc() {
> > fmt.Printf("func is %s\n", funcName)
Hi guys,
How can I handle to write something out using bufio.NewWriter?
My code is like below,
var writer *bufio.Writer
var err error
file, _ := os.OpenFile(*fileName, os.O_WRONLY | os.O_APPEND, 0644)
defer file.Close()
writer = bufio.NewWriter(file)
writer.WriteString(strings.Join("something\
Thanks Jan!
You are great!
On Saturday, 3 June 2017 13:00:51 UTC+2, Jan Mercl wrote:
>
> On Sat, Jun 3, 2017 at 12:42 PM Harry >
> wrote:
>
> > How can I handle to write something out using bufio.NewWriter?
>
> Just fine. The problem is you haven't created any
Does 'escape to heap' not imply it
will be allocated in heap?Any call to re.Match or fmt.Println() escapes the
string?*
System details
```
go version go1.8 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="
I’m trying to feed the results from the SQL Query into the Sum field of my
struct however i’m met with this error despite their being a Sum Field in
the struct.
The results from the query can range from 1-8 numbers depending on the date
input in my REACT interface.
package main
import (
“en
20 matches
Mail list logo