Code-cleanup with goimports
This commit is contained in:
parent
49a24fd68f
commit
daec91ff2c
5 changed files with 12 additions and 25 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue