[go-nuts] Re: Simple Go web server that service files

2019-05-07 Thread suntong001
On Tuesday, May 7, 2019 at 7:40:19 AM UTC-4, Luis Furquim wrote: > > Hi > > I think that this is the case that "proper way" means "the one that fits > your needs". > Ah, yeah, that's true -- I thought that there are some canonical ways, but you are indeed right. -- You received this

[go-nuts] Re: Simple Go web server that service files

2019-05-07 Thread Luis Furquim
Hi I think that this is the case that "proper way" means "the one that fits your needs". Some solutions you may adopt: a) (cd /path/to/my/server/directory ; go run main.go) & b) use absolute pathnames: os.Open("/path/to/my/server/directory/ images/my.png") c) Load configuration from some file/db