Package gorilla/mux implements a request router and dispatcher for matching incoming requests to their respective handler.
Questions tagged [mux]
331 questions
0
votes
0 answers
Golang serves mixed responses
I'm writing an REST API in Go following this example as a basis.
Now the issue i'm having is while doing multiple simultaneous requests to the GET route, it serves the first result to all pending clients. Instead of only sending the response to the…

JoeriV
- 357
- 2
- 9
0
votes
1 answer
VHDL: muxes between 11 buses 8 bits wide output
i recieved this question as a pre interview question "Draw a diagram and write the VHDL code for a module that meets the following requirements:
a. Fully synchronous.
b. Muxes between 11 buses where each bus is 8-bits wide.
c. Has 2 cycles of…

bruno salapic
- 65
- 1
- 1
- 11
0
votes
1 answer
Structural design for testing a gate system
I'm working on experiment 3 in the book Fundamentals of Digital and Computer Design with VHDL. This is what it wants.
I have Modules 1,2,and 3 all working individually. It's when I try to get them together in the top module that I start having…

user3542837
- 47
- 5
0
votes
1 answer
Unit Testing App Engine with Gorilla MUX
I want to write tests for handlers in Google App Engine that use Gorilla mux to read variables from the request URL.
I understand from the documentation that you can create a fake context and request to use with testing.
I'm calling the handler…

cheeze
- 427
- 5
- 16
0
votes
1 answer
Undefined return type in Go
I'm fairly new to Go and am having trouble with a code snippet that uses mux-gorilla sessions/cookies. There is a lot of redundancy that I would like to reduce with the following function:
func isLoggedIn(w http.ResponseWriter, r *http.Request)…

jhc
- 1,739
- 3
- 21
- 46
0
votes
1 answer
How to get OR pattern in Gorilla mux routing
I'm trying to use Gorilla mux router to handle paths that respond to a limited list of strings in the URL. The service I am developing will take files from the caller and pass them through an "adapter" that send them to S3 or OneDrive, depending on…

Michael M
- 8,185
- 2
- 35
- 51
0
votes
1 answer
Golang gorilla mux not found handler doesn't work correct
I'm writing a web server and I've got Not Found Handler function.
All the Handle functions like login, registration, view page are working correctly.
I also have such line: router.NotFoundHandler = http.HandlerFunc(Handlers.NotFoundHandler)
Handlers…

utkillr
- 45
- 1
- 9
0
votes
1 answer
Go cannot call NewRouter() function
I'm new to Go, but I'm trying to create a RESTful API using Gorilla Mux to create my router based on this article http://thenewstack.io/make-a-restful-json-api-go/
I have a Router file with the below code in it.
package main
import (
…

CGideon
- 143
- 2
- 15
0
votes
1 answer
Behavioral verilog: creating multiple muxes with 1 module
If I have a module defined like this:
module mux_1x2(in, out, select);
and I need 32 of them, I know that using structural coding I can do:
mux_1x2 mux01(in[0], out[0], select);
mux_1s2 mux02(in[1], out[1], select);
etc...
But how can I use…

Austin
- 6,921
- 12
- 73
- 138
0
votes
1 answer
Feedback on Mux fail to run in Verilog
I am doing the calculation where the output is one of the next input. However the mux output just providing X and causes all the rest calculation to go wrong. How to overcome this issue? Is it due to the clock?
Here is my code:
module all2(input…

Jack93
- 21
- 1
- 4
- 13
0
votes
1 answer
one common http handler instead of several
Is it possible to not copy paste expression commonHanlder(handler1), commonHanlder(handler2) ... commonHanlder(handlerN) in this code:
rtr.HandleFunc("/", commonHanlder(handler1)).Methods("GET")
rtr.HandleFunc("/page2",…

Maxim Yefremov
- 13,671
- 27
- 117
- 166
0
votes
2 answers
What Response Code to return on a non-supported HTTP Method on REST?
I'm using Gorilla Mux to handle my HTTP routes for my REST API. I'm using the following binding for my API:
r := mux.NewRouter()
r.Host(baseUrl)
api := r.PathPrefix("/api").Subrouter()
api.HandleFunc("/users", APIUsers).Methods("GET",…
user1467267
0
votes
2 answers
Go with Gorilla Mux routing using Angular.js
I can't seem to get my routing right. I'm using Gorilla Mux and I'm trying to serve my angular app, so basically my index.html, from any url except them starting with "/foo".
This one works:
func StaticFileServer(w http.ResponseWriter, r…

QlliOlli
- 637
- 3
- 13
- 25
0
votes
1 answer
Vhdl Multiplier usage too low
My design utilizes the Spartan 3E XC35100E device. I can use a total of 4 MUX. However, despite using 3 * signs and a FFT block (which also uses 3 MUX), the design summary specifies that I only use 1 MUX. Even when I use CLB logic in place of MUX…

BayK
- 37
- 1
- 6
0
votes
1 answer
Read am3335x i/o mux output state?
On the TI am3335x processor, the physical i/o pins are muxed to different internal registers.
I can read the state of these internal registers, but what I would like to do is read the
state on the physical output of the mux instead, so that I can…

JohnyTex
- 3,323
- 5
- 29
- 52