Example of a function f and a set E with the following: f is uniformly continuous on E, but f doesn't attain either a max or a min on E.

I thought I could use a constant function but I think absolute maximums are attained on a constant function.

Consider $$f:\mathbb{R}\to\mathbb{R}$$ with $$f(x):=x$$. Since for any $$x,y\in\mathbb{R}$$ we have $$|f(x)-f(y)|=|x-y|$$, $$f$$ is uniformly continuous. It does not attain minimum or maximum, as $$f$$ is unbounded.
The key here is to choose a domain $$E$$ that isn't compact. Can you think of a nice, uniformly continuous, function on the open interval $$(0,1)$$ that doesn't have a maximum or minimum on that interval?