Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

关于源码中的Product 和 Provider的疑惑 #37

Closed
xiispace opened this issue Dec 24, 2018 · 1 comment
Closed

关于源码中的Product 和 Provider的疑惑 #37

xiispace opened this issue Dec 24, 2018 · 1 comment
Labels

Comments

@xiispace
Copy link

@mingyuan-xia 请问下,源码中的Product 和 Provider的相关代码是遗留代码吗,是不已经被Device取代不再使用

@mingyuan-xia
Copy link
Collaborator

有些API还是会用到的,搜一下diamante

r.HandleFunc("/products/{brand}/{model}", func(w http.ResponseWriter, r *http.Request) {
                vars := mux.Vars(r)
                brand, model := vars["brand"], vars["model"]
                products, err := db.ProductsFindAll(brand, model)
                if err != nil {
                        http.Error(w, err.Error(), 500)
                        return
                }
                renderJSON(w, products)
        })

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants