Skip to content

Instantly share code, notes, and snippets.

@zaz600
zaz600 / web_check_1.go
Last active February 23, 2021 08:32
web_check
// web_check.go
package main
import (
"fmt"
"net/http"
)
const url = "https://golang.org/"
// web_check.go
package main
import (
"fmt"
"net/http"
"time"
)
const url = "https://golang.org/"
package main
import (
"fmt"
"net/http"
"os"
"time"
)
const url = "https://golang.org/"
// web_check.go
package main
import (
"fmt"
"net/http"
"os"
"time"
)
// web_check.go
package main
import (
"flag"
"fmt"
"net/http"
"os"
"time"
)
package main
import (
"encoding/json"
"io/ioutil"
"log"
"os"
)
type Config struct {
#Пример файла конфигурации
#Файл в формате YAML поэтому ОТСТУПЫ, ЗНАКИ ТИРЕ (-), ДВОЕТОЧИЯ очень важны
#Для отступов НЕ ИСПОЛЬЗОВАТЬ ТАБУЛЯТОРЫ
#Включить просмотр статистики по HTTP
enable_http: true
#адрес:порт на котором будет доступна статистика
listen: 0.0.0.0:8899
package main
import (
"encoding/json"
"io/ioutil"
"log"
"os"
"strings"
"time"
)
package main
import (
"encoding/json"
"io/ioutil"
"log"
"math/rand"
"os"
"path/filepath"
"strings"
package main
import (
"encoding/json"
"io/ioutil"
"log"
"math/rand"
"os"
"path/filepath"
"strings"