Closed zackkitzmiller closed 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!
Will do, sir!
Updated the PR, sir. I felt that GetServerFromRequest
was an appropriate name.
Looks good!
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.