/GoCycle

Simply iterate through a list.

Primary LanguageGoApache License 2.0Apache-2.0

Installation:

go get github.com/Terminal1337/GoCycle

Usage:

package main

import (
	"time"
	"github.com/Terminal1337/GoCycle"
)

func main() {
	cycle, err := GoCycle.NewFromFile("proxies.txt") // Load from list: GoCycle.New(List *[]string)

	if err != nil {
		panic("Can't open proxy file")
	}

	// Remove all duplicate items
	cycle.ClearDuplicates()

	// Lock the element "a" while 5 seconds
	go cycle.LockByTimeout("a", 5*time.Second)

	// Lock element
	cycle.Lock("a")

	// Unlock element
	cycle.Unlock("a")

	// Check if element is locked
	cycle.IsLocked("a")

	// Check if element is in list
	cycle.IsInList("a")

	// Get the next element from the list
	cycle.Next()

	// Remove element from cycle
	cycle.Remove("a")

        // Combine Cycles
        cycle.CombineCycles(cycle1,cycle2,cycle33)

        // Get Cycle Len
        cycle.ListLength()
}

I didn't make this you fuck