My wife is a golfer and I know that people do walk across the course from time to time so was a bit curious when I saw this thread.
Found the following:Scottish Outdoor Access Code, 2005
Part 2 ACCESS RIGHTS
A summary of your access rights
5 The main places where access rights do not apply are:
• golf courses (but you can cross a golf course provided you don’t interfere with any games of golf);
Where and when you can exercise access rights
2.2 Everyone, whatever their age or ability, can exercise access rights over most land and inland water in Scotland, at any time of day or night, providing they do so responsibly2. These rights do not extend to all places or to all activities (see paragraphs 2.11 to 2.15). Provided you do so responsibly (see Parts 3 and 5 of the Code), you can exercise access rights in places such as:
• golf courses, but only for crossing them and providing that you do not take access across greens or interfere with any games of golf;
The references to golf courses do talk about "crossing them". Maybe "walking along" isn't "crossing" ?