How to implement the second parameter in go language to false
ezewu opened this issue · comments
Mr.Wu commented
casbin.NewEnforcer(cfg.CasbinModelConf, false)
ZhengJin commented
Sorry I didn't use go language. What's the second parameter you're referring to?
Mr.Wu commented
The second parameter I'm referring to is how the Java library of false implements the second parameter passing false
ZhengJin commented
What is the role of the second parameter false in the go language implementation?
Mr.Wu commented
CSV files stored in database
Eric Luo commented
The 2nd arg in Golang's NewEnforcer()
means enableLog
, see: https://casbin.org/docs/en/log-error
ZhengJin commented
- If you need to disable the log, you can set it after getting the enforcer object. In spring, the enforcer object is a singleton.
- If you need to store the CSV file in the database, it is recommended to use the database tool to import directly, you can also submit a PR for this function.