Skip to content

build: add import of casnode conf - #12

Merged
hsluoyz merged 1 commit into
casdoor:masterfrom
baka-world:fix/discuzx-conf-import
Oct 11, 2026
Merged

hsluoyz merged 1 commit into
casdoor:masterfrom
baka-world:fix/discuzx-conf-import

Conversation

@baka-world

Copy link
Copy Markdown
Contributor

Problem

discuzx/casdoor_init.go calls conf.GetConfigString() but doesn't import github.com/casbin/casnode/conf, so the discuzx package fails to build:

# github.com/casbin/casnode/discuzx
discuzx/casdoor_init.go:29:24: undefined: conf
discuzx/casdoor_init.go:30:23: undefined: conf

It is introduced in commit: 74e0fd9 . The CI go build at the repo root doesn't compile the discuzx package (nothing imports it), so the error is not caught in CI.

Fix

Add "github.com/casbin/casnode/conf" to the imports of discuzx/casdoor_init.go.

Tests

go build ./discuzx/

now succeeds with no output.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@baka-world

Copy link
Copy Markdown
Contributor Author

I have agreed to the CLA.

@hsluoyz
hsluoyz merged commit 8f376b0 into casdoor:master Oct 11, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] fix undefined conf build error in discuzx package

3 participants