This repository was archived by the owner on Feb 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -134,13 +134,13 @@ func (p *UserAgent) detectBrowser(sections []section) {
134
134
}
135
135
}
136
136
137
- // Returns two strings. The first string is the name of the engine and the
137
+ // Engine returns two strings. The first string is the name of the engine and the
138
138
// second one is the version of the engine.
139
139
func (p * UserAgent ) Engine () (string , string ) {
140
140
return p .browser .Engine , p .browser .EngineVersion
141
141
}
142
142
143
- // Returns two strings. The first string is the name of the browser and the
143
+ // Browser returns two strings. The first string is the name of the browser and the
144
144
// second one is the version of the browser.
145
145
func (p * UserAgent ) Browser () (string , string ) {
146
146
return p .browser .Name , p .browser .Version
Original file line number Diff line number Diff line change @@ -282,17 +282,17 @@ func (p *UserAgent) detectOS(s section) {
282
282
}
283
283
}
284
284
285
- // Returns a string containing the platform..
285
+ // Platform returns a string containing the platform..
286
286
func (p * UserAgent ) Platform () string {
287
287
return p .platform
288
288
}
289
289
290
- // Returns a string containing the name of the Operating System.
290
+ // OS returns a string containing the name of the Operating System.
291
291
func (p * UserAgent ) OS () string {
292
292
return p .os
293
293
}
294
294
295
- // Returns a string containing the localization.
295
+ // Localization returns a string containing the localization.
296
296
func (p * UserAgent ) Localization () string {
297
297
return p .localization
298
298
}
@@ -325,7 +325,7 @@ func osName(osSplit []string) (name, version string) {
325
325
return name , version
326
326
}
327
327
328
- // Returns combined information for the operating system.
328
+ // OSInfo returns combined information for the operating system.
329
329
func (p * UserAgent ) OSInfo () OSInfo {
330
330
// Special case for iPhone weirdness
331
331
os := strings .Replace (p .os , "like Mac OS X" , "" , 1 )
Original file line number Diff line number Diff line change @@ -164,23 +164,23 @@ func (p *UserAgent) Parse(ua string) {
164
164
}
165
165
}
166
166
167
- // Returns the mozilla version (it's how the User Agent string begins:
167
+ // Mozilla returns the mozilla version (it's how the User Agent string begins:
168
168
// "Mozilla/5.0 ...", unless we're dealing with Opera, of course).
169
169
func (p * UserAgent ) Mozilla () string {
170
170
return p .mozilla
171
171
}
172
172
173
- // Returns true if it's a bot, false otherwise.
173
+ // Bot returns true if it's a bot, false otherwise.
174
174
func (p * UserAgent ) Bot () bool {
175
175
return p .bot
176
176
}
177
177
178
- // Returns true if it's a mobile device, false otherwise.
178
+ // Mobile returns true if it's a mobile device, false otherwise.
179
179
func (p * UserAgent ) Mobile () bool {
180
180
return p .mobile
181
181
}
182
182
183
- // Returns the original given user agent.
183
+ // UA returns the original given user agent.
184
184
func (p * UserAgent ) UA () string {
185
185
return p .ua
186
186
}
You can’t perform that action at this time.
0 commit comments