Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
webtopaz
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
1.
▲
by
webtopaz
12y ago
I have worked in outsourced projects for a big company in the past and our team got the work done. I have since then started my own company and have been working for US customers from India. My current customer is a startup from Philly for
2.
▲
by
webtopaz
12y ago
Yes. It won't compile. This check is not really needed as the code would fail when a function which accepts scan.Writer would fail (compilation) if ColumnWriter is sent and if it doesn't satisfy the interface. However, this is eas
3.
▲
by
webtopaz
12y ago
This is how you can make sure that a struct implements an interface. The line 'var _ scan.Writer = (*ColumnWriter)(nil)' assigns a nil pointer of the struct to a scan.Writer interface reference which would fail if ColumnWriter doe
4.
▲
by
webtopaz
12y ago
It is a perfectly reasonable way to test for interfaces. A single struct may satisfy a hundred interfaces which it doesn't even know about, this is actually one of the best traits of go.