MCPcopy Index your code
hub / github.com/coder/coder / fetchAppName

Method fetchAppName

coderd/notifications/fetcher.go:33–46  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

31}
32
33func (n *notifier) fetchAppName(ctx context.Context) (string, error) {
34 appName, err := n.store.GetApplicationName(ctx)
35 if err != nil {
36 if errors.Is(err, sql.ErrNoRows) {
37 return notificationsDefaultAppName, nil
38 }
39 return "", xerrors.Errorf("get application name: %w", err)
40 }
41
42 if appName == "" {
43 appName = notificationsDefaultAppName
44 }
45 return appName, nil
46}
47
48func (n *notifier) fetchLogoURL(ctx context.Context) (string, error) {
49 logoURL, err := n.store.GetLogoURL(ctx)

Callers 2

fetchHelpersMethod · 0.95

Calls 3

GetApplicationNameMethod · 0.65
IsMethod · 0.45
ErrorfMethod · 0.45

Tested by 1