On 20 Jan 2019, at 20:20, Tycho Andersen
mailto:ty...@tycho.ws>> wrote:
That's how I have it now. The problem with this is that in the face of
modules, it re-writes the go.mod and go.sum files to not include the
deps of the binary it's not currently building, so you end up with a
bunch of unneces
The Gonum project would like to hear what you think to help us improve
the project.
We are conducting a user survey to understand user preferences and to
guide the future of the project. Please help us understand how to
develop the code and the community by participating in the survey by 28
Februa
I was working on a tool that needed to know the file system paths and
version information of some of its dependencies from go.mod for code
generation. I couldn't find any official way of obtaining these
(debug/gosym was close, but didn't work for the current binary on any
OS), so I wrote this packa
On Mon, Jan 21, 2019, at 00:39, 伊藤和也 wrote:
> I checked the type of the variable "v" with interface{} using TypeOf
> function in reflect package but it returned "nil".
> var v interface{}
> fmt.Println(reflect.TypeOf(v))
>
That is what the reflect.TypeOf function is supposed to do. The docs
spe
I checked the type of the variable "v" with interface{} using TypeOf
function in reflect package but it returned "nil".
var v interface{}
fmt.Println(reflect.TypeOf(v))
Process finished with exit code 0
--
You received this message because you are subscribed to the Google Groups
"golang-nu
Hi
I guess the problem is the range over the input.
if you have utf8 runes > 1byte in your input,
you are not iterating with over each byte anymore.
the i is the index of a encoded rune the string., right?
Sent from my iPhone
> On 19. Jan 2019, at 13:53, Soorya Prakash wrote:
>
>
> I am using
On Jan 20, 2019, at 18:00, 伊藤和也 wrote:
>
> I know "nil" is zero values for slices, maps, interfaces, etc but I don't
> know what "nil" implays. Does nil implay the absence of value or a variable
> has't been initialized yet or something else?
Basically yes, all of the above. This pattern dates
On Jan 20, 2019, at 16:36, Burak Serdar wrote:
>
>> On Sun, Jan 20, 2019 at 2:32 PM 伊藤和也 wrote:
>>
>> type a interface{
>> m()
>> }
>>
>> type abc int
>> func (abc) m() {}
>>
>> func main() {
>> var v a
>> v.m()
>^^
>
> v is nil. It is declared but never assigned a value. You a
I know "nil" is zero values for slices, maps, interfaces, etc but I don't
know what "nil" implays. Does nil implay the absence of value or a variable
has't been initialized yet or something else?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
wouldn't the compiler be able to use the fact that a return value is known
not to be being used in a particular call, somewhere one or more of the
returned values are assigned to a blank, to be able to generate faster code
for that call?
or is it already being done? because, it seems to me, kno
On Sun, Jan 20, 2019 at 2:32 PM 伊藤和也 wrote:
>
> type a interface{
>m()
> }
>
> type abc int
> func (abc) m() {}
>
> func main() {
>var v a
>v.m()
^^
v is nil. It is declared but never assigned a value. You are
dereferencing v to call m, causing nil ptr dereference.
> }
>
> p
type a interface{
m()
}
type abc int
func (abc) m() {}
func main() {
var v a
v.m()
}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc005 code=0x0 addr=0x0 pc=0x44e236]
--
You received this message because you are subscribed to the Google Groups
On Sun, Jan 20, 2019 at 11:20 AM Tycho Andersen wrote:
> On Sun, Jan 20, 2019 at 11:18:38AM -0800, Jinwoo Lee wrote:
> > It looks like "go build ./cmd/..." works when there's only one directory
> > under cmd. When there are multiple directories there, the command doesn't
> > generate any binaries
On Sun, Jan 20, 2019 at 11:33 AM Jan Mercl <0xj...@gmail.com> wrote:
>
>
>
> On Sun, Jan 20, 2019 at 8:22 PM Jinwoo Lee wrote:
>
> > It looks like "go build ./cmd/..." works when there's only one directory
> under cmd. When there are multiple directories there, the command doesn't
> generate any
On Sun, Jan 20, 2019 at 8:22 PM Jinwoo Lee wrote:
> It looks like "go build ./cmd/..." works when there's only one directory
under cmd. When there are multiple directories there, the command doesn't
generate any binaries for me.
It works on all sub directories. But `go build` puts the binary loc
It looks like "go build ./cmd/..." works when there's only one directory
under cmd. When there are multiple directories there, the command doesn't
generate any binaries for me.
I would just do
$ go build ./cmd/foo
$ go build ./cmd/bar
They create binaries in the current directory so you don't ev
On Sun, Jan 20, 2019 at 11:18:38AM -0800, Jinwoo Lee wrote:
> It looks like "go build ./cmd/..." works when there's only one directory
> under cmd. When there are multiple directories there, the command doesn't
> generate any binaries for me.
>
> I would just do
>
> $ go build ./cmd/foo
> $ go bu
On Sunday, January 20, 2019 at 7:56:39 AM UTC-5, 伊藤和也 wrote:
>
> Yes I did. Can I say a method set is the one which associates an interface
> with methods?
>
Almost. The method set *of an interface* is the set of methods in the
interface. But other types, aside from interfaces, also have method
On Sunday, January 20, 2019 at 10:14:05 AM UTC-5, Soorya Prakash wrote:
>
>
> I am using the below code to encrypt and decrypt the data. Now I want to
> encrypt the data from Node JS and want to decrypt the data from Go lang.
>
use -1 as the key to debug. once that works, use zero as the key.
On Sun, Jan 20, 2019 at 4:13 PM Soorya Prakash
wrote:
> for i := range input {
> output += string(input[i] ^ key[i%len(key)])
> }
BTW, that's O(n^2).
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this g
It can be verified by use of tuples
x, (y, z) := A[id1], B[id2]
But the above doesn't work. Why ?
On Monday, June 6, 2011 at 11:13:04 PM UTC+5:30, soapboxcicero wrote:
>
> var A, B map[something]bool
> ...
> x, y, z := A[id1], B[id2]
>
> is y the value of B[id2] and z whether it's in B or is y wh
I have the same problem with latest version (1.11.4).
I've been trying to use two shared objects A and B (with c-shared build
mode), and use my C++ program to pass the functions exported by A to B
through GoInterface parameters. However, in B the type assertion from
GoInterface failed...
Any k
I am using the below code to encrypt and decrypt the data. Now I want to
encrypt the data from Node JS and want to decrypt the data from Go lang.
But I am not able to achieve it using GO lang.
var B64XorCipher = {
encode: function(key, data) {
return new Buffer(xorStrings(key, data),'utf8
Yes I did. Can I say a method set is the one which associates an interface
with methods?
2019年1月20日日曜日 21時37分23秒 UTC+9 伊藤和也:
>
> What exactly is a method set?
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and
Have you see the Go Spec?
https://golang.org/ref/spec#Method_sets
On Sun, 20 Jan 2019 at 12:37, 伊藤和也 wrote:
>
> What exactly is a method set?
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop recei
What exactly is a method set?
--
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.
For more options, visit https://groups.goo
26 matches
Mail list logo