version_handler.go 618 B

123456789101112131415161718192021222324
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. package api // import "miniflux.app/v2/internal/api"
  4. import (
  5. "net/http"
  6. "runtime"
  7. "miniflux.app/v2/internal/http/response"
  8. "miniflux.app/v2/internal/version"
  9. )
  10. func (h *handler) versionHandler(w http.ResponseWriter, r *http.Request) {
  11. response.JSON(w, r, &versionResponse{
  12. Version: version.Version,
  13. Commit: version.Commit,
  14. BuildDate: version.BuildDate,
  15. GoVersion: runtime.Version(),
  16. Compiler: runtime.Compiler,
  17. Arch: runtime.GOARCH,
  18. OS: runtime.GOOS,
  19. })
  20. }