HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/share/filebeat/module/cisco/shared/stringset.go
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build ignore

package main

import (
	"sort"
	"strings"
)

type stringSet map[string]struct{}

func newStringSet(list []string) stringSet {
	r := stringSet{}
	for _, value := range list {
		if len(value) != 0 {
			r[value] = struct{}{}
		}
	}
	return r
}

func (set stringSet) merge(o stringSet) {
	for key := range o {
		set[key] = struct{}{}
	}
}

func (set stringSet) equal(other stringSet) bool {
	if len(set) != len(other) {
		return false
	}
	for k := range set {
		if _, found := other[k]; !found {
			return false
		}
	}
	return true
}

func (set stringSet) MarshalYAML() (interface{}, error) {
	keys := make([]string, 0, len(set))
	for key := range set {
		keys = append(keys, key)
	}
	sort.Strings(keys)
	return keys, nil
}

func (set stringSet) String() string {
	yaml, _ := set.MarshalYAML()
	return strings.Join(yaml.([]string), ", ")
}