Review patch to reduce the number of files in projects that use go.wde

118 views
Skip to first unread message

André Moraes

unread,
Jul 5, 2012, 10:30:47 AM7/5/12
to go-...@googlegroups.com
When using go.wde the user need to include at least three files just
to import/init the backend implementation.
With this patch, instead of creating three files in the application,
the user just need to import one package from go.wde

import (
_ "github.com/skelterjohn/go.wde/init"
)

Then, inside of the init package the 3 files (init_linux,
init_windows, init_darwin) load the right backend for the target
platform.

The patch can be aplied with "git am <filename>"

--
André Moraes
http://amoraes.info
0001-Creating-init-package.zip

John Asmuth

unread,
Jul 7, 2012, 9:05:28 AM7/7/12
to go-...@googlegroups.com
Hi Andre,

One issue here is that someone using darwin might want to use the xgb backend - maybe they didn't install the framework.

That being said, I still think this is a good idea. But the preferred way of submitting is a fork/pull-request. Don't forget to add yourself to AUTHORS.

u

unread,
Jul 8, 2012, 8:23:55 AM7/8/12
to go-...@googlegroups.com
The init package includes the default backend for each platform. If a user wants to use any other backend than the default one, it would be trival to import each backend as it is already done today instead of importing the init package.
Reply all
Reply to author
Forward
0 new messages