Thanks to visit codestin.com
Credit goes to github.com

Skip to content

关于App.Domain信息的提问 #170

@zhaohaihang

Description

@zhaohaihang

在main.go代码中
此行代码“global.App.Init(logic.WebsiteSetting.Domain)“,表示通过WebsiteSetting.Domain给App.Domain赋值,但是WebsiteSetting是通过另一个goroutine 从数据库中取值。基于以上情况,请问如何保证,在给App.Domain赋值之前,WebsiteSetting已经获取了值?

我在debug时,多次发现,App.Domain一直是空字符串。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions