fix some issues with Go linting
fix an encoding error
use a set when iterating highlight scopes