This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"log" | |
"net/http" | |
"strconv" | |
) | |
func ServeJSON(rw http.ResponseWriter, obj interface{}) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adapted from the "best" solution supplied by StackExchange user gihanchanuka: | |
// https://stackoverflow.com/questions/2137357/getpasswd-functionality-in-go | |
// | |
// Tested in Windows Powershell and Windows cmd | |
package main | |
import ( | |
"bufio" | |
"fmt" |