VictorNine / bitwarden-go

A Bitwarden-compatible server written in Golang
MIT License
250 stars 33 forks source link

Add attachment support #22

Closed Odysseus16 closed 6 years ago

VictorNine commented 6 years ago

I have not had time for a full review yet, but would you consider rebaseing? 8 commits is a little much for this and I don't like having imports to other repo's in the commit history. And also look in to the failing travis build.

Odysseus16 commented 6 years ago

Yeah, I am sorry. I was in a hurry as I had a lot of work to do. Also, I am quite new to go, and so it would be great if you could help me to change from net/HTTP to gorilla mux or something else. I don´t like net/HTTP as you do not have any parameters in the handler. PS: it is important for the organization feature.

VictorNine commented 6 years ago

That's not a problem using net/HTTP

Just do:

func HandleFoo(foo string) func(w http.ResponseWriter, r *http.Request) {
    return func(w http.ResponseWriter, r *http.Request) {
        }
})

http.HandleFunc("/foo", HandleFoo("bla"))

But I can't see why you need it.