func handleContain()

in http.go [172:188]


func handleContain(ctx Context, w http.ResponseWriter, group *Group, key string) {
	ok, err := group.Contain(ctx, key)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
	resp := &pb.ContainResponse{Exists: ok}

	// Write the value to the response body as a proto message.
	body, err := proto.Marshal(resp)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
	w.Header().Set("Content-Type", "application/x-protobuf")
	w.Write(body)
}