Thanks for the very clear explanation, Ian.
I figured there was something like that. It turns out I was using a fifo
badly (I was trying to model a sysfs attribute - clearly incorrectly as
I now find out that poll should wait on POLLPRI for sysfs attributes).
The original problem is now solved.
O
Rodrigo, I may need a bit more help with your example.
Can you get me past the Open function, when playing with the example it
seems to get stuck here:
func (fs filesOnlyFS) Open(name string) (http.File, error) {
f, err := fs.Open(name)
Is this a recursive call?..doesn't seem to get past this wh
On Thu, Sep 15, 2016 at 6:41 PM, Dan Kortschak
wrote:
> I am in the process of adding sysfs polling support for a physical
> device and I'm using a small Go program
> (https://play.golang.org/p/5v8DsGv6Dk) to help test whether what I'm
> doing is working (it's not yet).
>
> In doing this, I've fou
I am in the process of adding sysfs polling support for a physical
device and I'm using a small Go program
(https://play.golang.org/p/5v8DsGv6Dk) to help test whether what I'm
doing is working (it's not yet).
In doing this, I've found somethings that I don't understand with the
golang.org/x/sys/un
Aha, now I understand. I managed to reproduce the problem and the failure
was occurring while running go vet after the build target (which runs go
build on all our packages). Switching to go install to build the packages
cleared the problem right up.
On Thu, 15 Sep 2016 at 20:19 Dave Cheney wrote
I don't think it's about the installation of the tools. The problem you've
described sounds like you have tools that use the compiled form of the package,
but your development process has not embraced go install so what you go build
the later test is not the same thing.
--
You received this m
On Thu, Sep 15, 2016 at 5:53 PM, Joe Blue wrote:
> thanks James
>
> You lost me here.
>
Where's here? O can try to provide more detail if you let me know what
you're not following. If you go into each repo that's not working and
checkout master, "go get -u" will work again.
> go get always pul
Thanks for the clarification and the advice.
Seems that what we need to do is make sure that these key tools are
installed from source in the makefile, or provide a script that installs
them as a post-go-upgrade step in our instructions. Will experiment with
those to see which works best for us
thanks James
You lost me here.
go get always pulls from master though ?
On Thu, Sep 15, 2016 at 1:25 PM James Bardin wrote:
> You have a few repos that aren't on a branch, so git can't pull and fast
> forward. You can checkout master in those repos, or delete them altogether
> and the next `
http.FileServer takes a FileSystem implementation, http.Dir will basically
allow accessing any dir/file that's why you get the index for directories.
You can create a custom FileSystem implementation:
https://play.golang.org/p/BcMLX2NWW7
On Thu, Sep 15, 2016 at 1:40 PM tobyjaguar wrote:
> Is po
ok, that sounds like a different problem. Some tools use the cached (.a
file in the pkg/ directory) version others use the src directly. If you
don't install, the tools that use the .a version will be out of date (at
best) or fail (at worse).
Really, you want to use go install, just trust me on
Is possible to serve a directory, http.FileServer(http.Dir(".")), without
listing the directory contents of that directory by navigating one folder
above it in the browser?
http.Handle("/img/", http.FileServer(http.Dir("static")))
https://groups.google.com/d/optout.
Thanks for the quick response :)
Great to hear that the go tool is intended to catch this. The problem was
typically seen when running our default make target, which uses build for
the build itself, but has some sanity checking and code generation steps
first, with tools like glock, errcheck an
Here's some code from the example that verifies your decimal value from
your input address:
https://gist.github.com/donovanhide/7fc3ca5170e8080c9eddda4014394ce0
On 15 September 2016 at 17:48, Donovan Hide wrote:
> Yep, read the docs:
>
> https://godoc.org/github.com/btcsuite/btcutil/base58#Chec
For anyone unfamiliar with SQLBoiler, SQLBoiler is an ORM generator that
uses code generation to gen a fully functioning ORM tailored specifically
to your schema. We weren't interested in the reflection-heavy code-first
approaches out there, so we decided to have a crack at a database-first
cod
Yep, read the docs:
https://godoc.org/github.com/btcsuite/btcutil/base58#CheckDecode
The "check" means run SHA256 twice over the previous payload bytes and use
the first 4 bytes of the result as the checksum.
On 15 September 2016 at 13:11, Nosferatu fist
wrote:
> No base58 but base58check
>
>
On Thu, Sep 15, 2016 at 8:47 AM, sqweek E. wrote:
>
> Thanks everyone for helping me learn! If you'll humour me a moment longer,
> I'm curious about the atomic.Value approach. If you have a single writer:
>
> newMap := make(map[int]int)
> newMap[4] = 2
> newMap[9] = 3
> x.myMap.Store(newMap) //x.m
Once you have the JSON encoded data in a byte slice, pass those bytes into
json.Unmarshal along with a reference to a variable of type AutoGenerated
(or whatever you decide to rename it to). ie:
import "encoding/json"
...
var bytes []byte
var data AutoGenerated
bytes = loadJSONFromDB(
While you can use the solution suggested by Viktor.
I do wonder what exactly is the point of the byte type?
I mean byte is just uint8 just like it says above.
So really if you want number between 0 and 255 you can just send along the
number.
This is gonna be more readable than some text encoding
Read the request.Body, close the request.Body, use the bytes read from
request.Body in json.Unmarshal.
--
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-nut
On Wednesday, September 14, 2016 at 2:58:24 AM UTC+8, Henrik Johansson
wrote:
>
> I think this will be an interesting read especially if you come from Java.
>
> https://shipilev.net/blog/2016/close-encounters-of-jmm-kind/
>
There were some surprises in there! With a bit more perspective I can se
Anybody knows about parsing data which is coming in somewhat json format?
string/int is fine. What will be the best way to parse json response.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving ema
I need to extend an existing template and add to what already rendered into
it, I have used {{block}} but it overrides the existing templates.
Master footer:
{{define "footer"}}
{{block "footerExtra" . }} {{end}}
{{end}}
App1:
{{block "footerExtra"}}
app1
{{end}}
App2:
{{block "f
No base58 but base58check
--
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.google.
You have a few repos that aren't on a branch, so git can't pull and fast
forward. You can checkout master in those repos, or delete them altogether and
the next `go get` will fetch the current master branch.
--
You received this message because you are subscribed to the Google Groups
"golang-
On Friday, 9 September 2016 21:51:05 UTC+2, Ian Lance Taylor wrote:
>
> On Fri, Sep 9, 2016 at 12:36 PM, >
> wrote:
> >
> > On Friday, 9 September 2016 18:45:24 UTC+2, Ian Lance Taylor wrote:
> >>
> >> On Fri, Sep 9, 2016 at 7:22 AM, wrote:
> >> >
> >> > I was trying to read a longer text
This package should help you out:
https://github.com/btcsuite/btcutil/tree/master/base58
--
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...@
hey all,
Does anyone know why "go get" causes the follow weird git messages ? This
does NOT happen with al git repos i have found.
a simple example:
x-MacBook-Pro:pkg apple$ go get github.com/pkg/sftp
x-MacBook-Pro:pkg apple$ go get -u -v github.com/pkg/sftp
github.com/pkg/sftp (d
Write a for loop :)
https://play.golang.org/p/OZvqcWEOIc
Also are you sure that the decimal number is correct... i.e. I got a
different result and http://lenschulwitz.com/base58 gives the same result.
+ Egon
On Thursday, 15 September 2016 11:26:11 UTC+3, Nosferatu fist wrote:
>
> First Hello a
First Hello and thank you for any help you can give me .
here I have traveled google but I have not found my happiness . I would like to
convert decimal number BASE58Check in my research but give nothing
example:
bitcoin address : 1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN
In decimal : 1037542844944
Hello,
I need to create the following JSON-File:
[{
"key": "Series 1",
"values": [
[
105167520,
0.44227126150934
],
[
105435360,
7.2481659343222
],
It would probably be pretty easy if you implement the json.Unmarshaler
interface on the byte type:
https://play.golang.org/p/hzGalLA2yA
On Wednesday, September 14, 2016 at 6:06:41 PM UTC+3, Luke wrote:
>
> Hi,
>
> i have something like: https://play.golang.org/p/j5WhDMUTI-
>
> type A struct {
>
32 matches
Mail list logo