marpaia / chef-golang

Go library to interact with the Chef server API
Other
77 stars 31 forks source link

allow connect by url and set header based on full path #2

Closed bakins closed 10 years ago

bakins commented 10 years ago

I added a new method - not sure it and the other connect is needed. Based on http://docs.opscode.com/api_chef_server.html

"HASHED_PATH is the path of the request (/name_of_endpoint for the open source server and /organizations/organization_name/name_of_endpoint for Hosted Chef or Private Chef)."

But I think as it is implemented, this code should work on both. I don't have an open source server to test against, so no clue if it works there.

marpaia commented 10 years ago

Looks great, my only comment would be to change chef_server_url to chefServerUrl based on Go idioms. I'll test it out on open source server tomorrow and merge.

bakins commented 10 years ago

I can edit it to follow the idioms. I'm such a go newb so I'm still learning :)