Add rule about 'localhost'
This commit is contained in:
@@ -77,6 +77,10 @@ var mappings = []*mapping{
|
||||
}
|
||||
|
||||
func (m *Mysql) gatherServer(serv string, acc plugins.Accumulator) error {
|
||||
if serv == "localhost" {
|
||||
serv = ""
|
||||
}
|
||||
|
||||
db, err := sql.Open("mysql", serv)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -69,7 +69,7 @@ func (p *Postgresql) Gather(acc plugins.Accumulator) error {
|
||||
}
|
||||
|
||||
func (p *Postgresql) gatherServer(serv *Server, acc plugins.Accumulator) error {
|
||||
if serv.Address == "" {
|
||||
if serv.Address == "" || serv.Address == "localhost" {
|
||||
serv = localhost
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user