()
| 30 | } |
| 31 | |
| 32 | func (this *MongoDBInfo) String() string { |
| 33 | url := fmt.Sprintf("mongodb://%s:%s@%s:%d/%s", |
| 34 | this.DbUser, this.DbPass, this.DbHost, this.DbPort, this.DbName) |
| 35 | if this.DbUser == "" || this.DbPass == "" { |
| 36 | url = fmt.Sprintf("mongodb://%s:%d/%s", this.DbHost, this.DbPort, this.DbName) |
| 37 | } |
| 38 | return url |
| 39 | } |