Code-cleanup with goimports

This commit is contained in:
Enrico Stahn 2018-02-25 10:08:12 +11:00
parent 49a24fd68f
commit daec91ff2c
No known key found for this signature in database
GPG key ID: 5263621C269A50DE
5 changed files with 12 additions and 25 deletions

View file

@ -16,11 +16,12 @@ package cmd
import (
"encoding/json"
"fmt"
"time"
"github.com/davecgh/go-spew/spew"
"github.com/gosuri/uitable"
"github.com/hipages/php-fpm_exporter/phpfpm"
"github.com/spf13/cobra"
"time"
)
// Configuration variables

View file

@ -16,14 +16,15 @@ package cmd
import (
"context"
"fmt"
"github.com/hipages/php-fpm_exporter/phpfpm"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/spf13/cobra"
"net/http"
"os"
"os/signal"
"time"
"github.com/hipages/php-fpm_exporter/phpfpm"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/spf13/cobra"
)
// Configuration variables
@ -114,14 +115,6 @@ to quickly create a Cobra application.`,
func init() {
RootCmd.AddCommand(serverCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// serverCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
serverCmd.Flags().StringVar(&listeningAddress, "web.listen-address", ":9253", "Address on which to expose metrics and web interface.")
serverCmd.Flags().StringVar(&metricsEndpoint, "web.telemetry-path", "/metrics", "Path under which to expose metrics.")
serverCmd.Flags().StringSliceVar(&scrapeURIs, "phpfpm.scrape-uri", []string{"tcp://127.0.0.1:9000/status"}, "FastCGI address, e.g. unix:///tmp/php.sock;/status or tcp://127.0.0.1:9000/status")

View file

@ -31,14 +31,4 @@ var versionCmd = &cobra.Command{
func init() {
RootCmd.AddCommand(versionCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// versionCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// versionCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

View file

@ -11,12 +11,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// Package phpfpm provides convenient access to PHP-FPM pool data
package phpfpm
import (
"sync"
"github.com/prometheus/client_golang/prometheus"
"github.com/speps/go-hashids"
"sync"
)
const (

View file

@ -17,12 +17,13 @@ package phpfpm
import (
"encoding/json"
"fmt"
"github.com/tomasen/fcgi_client"
"io/ioutil"
"net/url"
"strconv"
"sync"
"time"
"github.com/tomasen/fcgi_client"
)
// PoolProcessRequestIdle defines a process that is idle.