Skip to content

dropout1337/GoCycle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation:

go get github.com/dropout1337/GoCycle

Usage:

package main

import (
	"time"
	"github.com/dropout1337/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")
}

I didn't make this you fuck

About

Simply iterate through a list.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%