mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-17 10:21:30 +02:00
Add support for fully offline binary via compile-time 'offline' tag (#272)
* Add support for fully offline binary via compile-time 'offline' tag * Update docs
This commit is contained in:
14
client/lib/net_disabled.go
Normal file
14
client/lib/net_disabled.go
Normal file
@ -0,0 +1,14 @@
|
||||
//go:build offline
|
||||
// +build offline
|
||||
|
||||
package lib
|
||||
|
||||
import "net/http"
|
||||
|
||||
func GetHttpClient() *http.Client {
|
||||
panic("Cannot GetHttpClient() from a hishtory client compiled with the offline tag!")
|
||||
}
|
||||
|
||||
func IsOfflineBinary() bool {
|
||||
return true
|
||||
}
|
Reference in New Issue
Block a user