github.com/cloud-foundations/dominator@v0.0.0-20221004181915-6e4fee580046/hypervisor/httpd/listAvailableAddresses.go (about) 1 package httpd 2 3 import ( 4 "bufio" 5 "net/http" 6 7 "github.com/Cloud-Foundations/Dominator/lib/json" 8 ) 9 10 func (s state) listAvailableAddressesHandler(w http.ResponseWriter, 11 req *http.Request) { 12 writer := bufio.NewWriter(w) 13 defer writer.Flush() 14 addresses := s.manager.ListAvailableAddresses() 15 json.WriteWithIndent(writer, " ", addresses) 16 }