Skip to content

Instantly share code, notes, and snippets.

func CaseInfo(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" {
if len(r.Form["rid"]) > 0 {
var c CaseDetailData
if len(r.Form["readonly"]) > 0 {
c.ReadOnly = "disabled=\"disabled\""
} else {
c.ReadOnly = ""
}
@hyg
hyg / sidebar.css
Last active August 29, 2015 14:04
a simple sidebar template
.nav .home {
padding: 12px;
color: #737373;
display: inline-block;
font-size: 14px;
margin-bottom: 2px;
margin-right: 4px;
max-width: 162px;
overflow: hidden;
text-overflow: ellipsis;
@hyg
hyg / gist:9c4afcd91fe24316cbf0
Created June 19, 2014 09:36
open browser in golang
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()
@hyg
hyg / gist:6838182
Created October 5, 2013 08:05
抓绒衣关键词
polartec thermal pro
primaloft