UnnoTed / fileb0x

a better customizable tool to embed files in go; also update embedded files remotely without restarting the server
MIT License
634 stars 53 forks source link

Undefined: err #22

Closed akerl closed 6 years ago

akerl commented 6 years ago

I'm getting an error that looks very similar to https://github.com/UnnoTed/fileb0x/issues/21 but I've double-checked and I have the fixed version of the code with the commit mentioned in that PR:

# github.com/akerl/github-auth-lambda/static
static/ab0x.go:45:5: undefined: err
static/ab0x.go:46:5: undefined: err
static/ab0x.go:47:9: undefined: err
static/ab0x.go:50:5: undefined: err
static/ab0x.go:51:5: undefined: err
static/ab0x.go:52:9: undefined: err
static/ab0x.go:55:2: undefined: err
static/ab0x.go:56:5: undefined: err
static/ab0x.go:57:9: undefined: err

Here's my box.yaml: https://github.com/akerl/github-auth-lambda/blob/9f2de9c3a6fe8bde4484aada59ad872ab57ef638/box.yaml

akerl commented 6 years ago

It looks like for the 1st one, err is only defined in the template if Updater is enabled: https://github.com/UnnoTed/fileb0x/blob/2e8a2eb7a01809a69cc8928a0ff48857a067a4da/template/files.go#L70

UnnoTed commented 6 years ago

it works now