docker_windows.go 768 B

1234567891011121314151617181920212223242526272829303132
  1. //go:build windows
  2. // +build windows
  3. package dockerux
  4. /*
  5. Windows docker UX optimizer dummy
  6. This is a dummy module for Windows as docker features
  7. is useless on Windows and create a larger binary size
  8. docker on Windows build are trimmed to reduce binary size
  9. and make it compatibile with Windows 7
  10. */
  11. import (
  12. "encoding/json"
  13. "net/http"
  14. "imuslab.com/zoraxy/mod/utils"
  15. )
  16. // Windows build not support docker
  17. func (d *UXOptimizer) HandleDockerAvailable(w http.ResponseWriter, r *http.Request) {
  18. js, _ := json.Marshal(d.RunninInDocker)
  19. utils.SendJSONResponse(w, string(js))
  20. }
  21. func (d *UXOptimizer) HandleDockerContainersList(w http.ResponseWriter, r *http.Request) {
  22. utils.SendErrorResponse(w, "Platform not supported")
  23. }