
# python wrapper for package github.com/Oneflow-Inc/go-goose/go_goose within overall package go_goose
# This is what you import to use the package.
# File is generated by gopy. Do not edit.
# gopy build -output=./py_go_goose -vm=python ./go_goose

# the following is required to enable dlopen to open the _go.so file
import os,sys,inspect,collections
try:
	import collections.abc as _collections_abc
except ImportError:
	_collections_abc = collections

cwd = os.getcwd()
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
os.chdir(currentdir)
from . import _go_goose
from . import go

os.chdir(cwd)

# to use this code in your end-user python file, import it as follows:
# from go_goose import go_goose
# and then refer to everything using go_goose. prefix
# packages imported by this package listed below:




# ---- Types ---

# Python type for slice [2]string
class Array_2_string(go.GoClass):
	""""""
	def __init__(self, *args, **kwargs):
		"""
		handle=A Go-side object is always initialized with an explicit handle=arg
		otherwise parameter is a python list that we copy from
		"""
		self.index = 0
		if len(kwargs) == 1 and 'handle' in kwargs:
			self.handle = kwargs['handle']
			_go_goose.IncRef(self.handle)
		elif len(args) == 1 and isinstance(args[0], go.GoClass):
			self.handle = args[0].handle
			_go_goose.IncRef(self.handle)
	def __del__(self):
		_go_goose.DecRef(self.handle)
	def __str__(self):
		s = 'go_goose.Array_2_string len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' ['
		if len(self) < 120:
			s += ', '.join(map(str, self)) + ']'
		return s
	def __repr__(self):
		return 'go_goose.Array_2_string([' + ', '.join(map(str, self)) + '])'
	def __len__(self):
		return _go_goose.Array_2_string_len(self.handle)
	def __getitem__(self, key):
		if isinstance(key, slice):
			return [self[ii] for ii in range(*key.indices(len(self)))]
		elif isinstance(key, int):
			if key < 0:
				key += len(self)
			if key < 0 or key >= len(self):
				raise IndexError('slice index out of range')
			return _go_goose.Array_2_string_elem(self.handle, key)
		else:
			raise TypeError('slice index invalid type')
	def __setitem__(self, idx, value):
		if idx < 0:
			idx += len(self)
		if idx < len(self):
			_go_goose.Array_2_string_set(self.handle, idx, value)
			return
		raise IndexError('slice index out of range')
	def __iter__(self):
		self.index = 0
		return self
	def __next__(self):
		if self.index < len(self):
			rv = _go_goose.Array_2_string_elem(self.handle, self.index)
			self.index = self.index + 1
			return rv
		raise StopIteration


#---- Enums from Go (collections of consts with same type) ---


#---- Constants from Go: Python can only ask that you please don't change these! ---


# ---- Global Variables: can only use functions to access ---


# ---- Interfaces ---


# ---- Structs ---


# ---- Slices ---


# ---- Maps ---


# ---- Constructors ---


# ---- Functions ---
def ExtractCleanText(rawHtml):
	"""ExtractCleanText(str rawHtml) []str results"""
	return Array_2_string(handle=_go_goose.go_goose_ExtractCleanText(rawHtml))


