MCPcopy Index your code
hub / github.com/apache/answer / httpsStatus

Method httpsStatus

internal/service/dashboard/dashboard_service.go:312–324  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

310}
311
312func (ds *dashboardService) httpsStatus(ctx context.Context) (enabled bool) {
313 siteGeneral, err := ds.siteInfoService.GetSiteGeneral(ctx)
314 if err != nil {
315 log.Errorf("get site general failed: %s", err)
316 return false
317 }
318 siteUrl, err := url.Parse(siteGeneral.SiteUrl)
319 if err != nil {
320 log.Errorf("parse site url failed: %s", err)
321 return false
322 }
323 return siteUrl.Scheme == "https"
324}
325
326func (ds *dashboardService) getTimezone(ctx context.Context) string {
327 siteInfoInterface, err := ds.siteInfoService.GetSiteInterface(ctx)

Callers 1

StatisticalMethod · 0.95

Calls 2

ParseMethod · 0.80
GetSiteGeneralMethod · 0.65

Tested by

no test coverage detected