lukevers / kittens

A scriptable IRC bot hub written in Go with Lua plugins
MIT License
83 stars 10 forks source link

Start to re-organize the proejct #40

Closed zackkitzmiller closed 10 years ago

zackkitzmiller commented 10 years ago

This is a bit of what I was thinking. I'm very open to comments/questions/etc.

I think we take it a bit further, but I think this is a great start.

lukevers commented 10 years ago

After taking a look at it, I think it looks great. I wasn't sure where the GetDefault func would go, and I think the utilities file is a great place for it. I think it could be renamed to something besides GetDefault now that it's being reorganized. It basically gets the server from /server/{id} and returns both the server from the slice of Servers and the ID. I don't think it should actually return the ID anymore since the ID is a field in the Server struct. I think it should be called GetServerFromID or maybe just GetServer, since it gets the ID first and then gets the server.

Want to go ahead and change the name of that and everywhere it's used? I think that's the only other thing I want to do for reorganizing everything.

Otherwise it looks good!

zackkitzmiller commented 10 years ago

Will do, sir!

zackkitzmiller commented 10 years ago

Updated the PR, sir. I felt that GetServerFromRequest was an appropriate name.

lukevers commented 10 years ago

Looks good!