简体   繁体   English

如何迭代请求参数

[英]How to iterate over request parameters

I'd like to iterate over the request parameters in the request handler.我想遍历请求处理程序中的请求参数。 I'm following the example from the documentation , but I can't get it to work.我正在按照文档中的示例进行操作,但无法使其正常工作。

By following the getting started guide and using the piece of code provided to range over parameters, I get :通过遵循入门指南并使用提供的一段代码来覆盖参数,我得到:

actions/home.go:8:26: undefined: url

Is there a way to iterate over the request parameters using buffalo's context?有没有办法使用 buffalo 的上下文迭代请求参数?

你必须导入url包链接

import "net/url"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM