1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// Copyright (c) 2024
// SPDX-FileCopyrightText: 2024 - 2025 Ali Sajid Imami
//
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
//! This crate provides functionality to generate random BOFH (Bastard Operator
//! From Hell) excuses.
//!
//! The purpose of this module is to allow an interface to generate random BOFH
//! excuses. There are two _flavors_ of excuses: [classic](excuses::CLASSIC) and
//! [modern](excuses::MODERN). Both flavors are available as static arrays of
//! string slices.
//!
//! ## Classic excuses
//! The classic excuses are inspired by the original BOFH excuse list from the
//! 90s. They revolve around the problems around physcial hardware, network
//! infrastructure and in-person enterprise support. There are a total of 467
//! classic excuses in the list.
//!
//! You can see the list of classic excuses by importing the `CLASSIC` constant
//! from [`gh_bofh_lib`](crate).
//!
//! You can also generate a random classic excuse by calling the
//! [`random_classic`] function.
//!
//! ### Examples
//! ```
//! use gh_bofh_lib::random_classic;
//! let excuse = random_classic();
//! println!("{}", excuse);
//! ```
//!
//! ## Modern excuses
//!
//! The modern excuses are inspired by the modern problems faced by IT
//! professionals. They revolve around cloud infrastructure, software
//! development, and remote support. There are a total of 105 modern excuses in
//! the list.
//!
//! You can see the list of modern excuses by importing the `MODERN` constant
//! from [`gh_bofh_lib`](crate).
//!
//! You can also generate a random modern excuse by calling the
//! [`random_modern`] function.
//!
//! ### Examples
//!
//! ```
//! use gh_bofh_lib::random_modern;
//! let excuse = random_modern();
//! println!("{}", excuse);
//! ```
//!
//! ## Other Examples
//!
//! ```
//! use gh_bofh_lib::{
//! random_classic,
//! random_modern,
//! };
//!
//! let classic_excuse = random_classic();
//! println!("Classic excuse: {}", classic_excuse);
//!
//! let modern_excuse = random_modern();
//! println!("Modern excuse: {}", modern_excuse);
//! ```
pub use ;
use IndexedRandom;
type ClassicExcuse = &'static str;
type ModernExcuse = &'static str;
/// Returns a random classic excuse
///
/// This function returns a random BOFH excuse from the classic list.
///
/// # Examples
///
/// ```
/// use gh_bofh_lib::random_classic;
///
/// let excuse = random_classic();
/// println!("{}", excuse);
/// ```
/// Returns a random modern excuse
///
/// This function returns a random BOFH excuse from the modern list.
///
/// # Examples
///
/// ```
/// use gh_bofh_lib::random_modern;
///
/// let excuse = random_modern();
///
/// println!("{}", excuse);
/// ```